fix: don't create un-needed save file
If we don't know if we support a game's save type yet, avoid creating a file for it.
This commit is contained in:
parent
4c172cff70
commit
37c039fb92
|
@ -102,11 +102,11 @@ pub const Backup = struct {
|
|||
const file_path = try self.getSaveFilePath(path);
|
||||
defer self.alloc.free(file_path);
|
||||
|
||||
switch (self.kind) {
|
||||
.Sram => {
|
||||
const file = try std.fs.createFileAbsolute(file_path, .{});
|
||||
defer file.close();
|
||||
|
||||
switch (self.kind) {
|
||||
.Sram => {
|
||||
try file.writeAll(self.buf);
|
||||
log.info("Dumped SRAM to {s}", .{file_path});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue