Delete old save file if it's been migrated

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion 2024-08-03 10:34:13 +02:00
parent 8995c590eb
commit cab3a7d214
No known key found for this signature in database
GPG Key ID: 3E85EB44F610AD7F
1 changed files with 3 additions and 0 deletions

View File

@ -667,6 +667,9 @@ pub fn main() !void {
.session_index = session.label.current,
};
ini.writeFromStruct(save_data, file.writer(), null, true, .{}) catch break :save_last_settings;
// Delete previous save file if it exists
std.fs.cwd().deleteFile(config.save_file) catch {};
}
var shared_err = try SharedError.init();