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
a93b335dea
commit
2d8fa9c2f7
|
@ -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