mirror of
https://github.com/fairyglade/ly.git
synced 2026-08-06 21:21:58 +00:00
migrator: Free old save path later
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -1648,6 +1648,7 @@ fn authenticate(ptr: *anyopaque) !bool {
|
||||
|
||||
// Delete previous save file if it exists
|
||||
if (migrator.maybe_save_file) |path| {
|
||||
defer temporary_allocator.free(path);
|
||||
std.Io.Dir.cwd().deleteFile(state.io, path) catch {};
|
||||
} else if (state.has_old_save) {
|
||||
std.Io.Dir.cwd().deleteFile(state.io, state.old_save_path) catch {};
|
||||
|
||||
Reference in New Issue
Block a user