mirror of https://github.com/stella-emu/stella.git
prevent creating lots of zero-size debugger script files when autosave is enabled
This commit is contained in:
parent
7be3a3b18e
commit
50c85d735c
|
@ -690,16 +690,21 @@ string DebuggerParser::saveScriptFile(string file)
|
|||
|
||||
FilesystemNode node(file);
|
||||
|
||||
try
|
||||
if(node.exists() || out.str().length())
|
||||
{
|
||||
node.write(out);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
return "Unable to save script to " + node.getShortPath();
|
||||
}
|
||||
try
|
||||
{
|
||||
node.write(out);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
return "Unable to save script to " + node.getShortPath();
|
||||
}
|
||||
|
||||
return "saved " + node.getShortPath() + " OK";
|
||||
return "saved " + node.getShortPath() + " OK";
|
||||
}
|
||||
else
|
||||
return "nothing to save";
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
Loading…
Reference in New Issue