mirror of
https://github.com/fadden/6502bench.git
synced 2026-04-27 03:17:45 +00:00
Fix weird error message
When creating a new project, we now put up a "save as" dialog. If you cancel out of the dialog, and have auto-save enabled, we post a strange message about being unable to create a file with an empty filename string.
This commit is contained in:
1 parent
69d3cd1867
commit
5544014b71
1 file changed
+8
-2
@@ -890,8 +890,13 @@ namespace SourceGen {
|
||||
"' in favor of '" + pathName + "'");
|
||||
DiscardRecoveryFile();
|
||||
}
|
||||
Debug.WriteLine("Recovery: creating '" + pathName + "'");
|
||||
PrepareRecoveryFile();
|
||||
if (!string.IsNullOrEmpty(pathName)) {
|
||||
Debug.WriteLine("Recovery: creating '" + pathName + "'");
|
||||
PrepareRecoveryFile();
|
||||
} else {
|
||||
// Must be a new project that has never been saved.
|
||||
Debug.WriteLine("Recovery: project name not set, can't create recovery file");
|
||||
}
|
||||
}
|
||||
mAutoSaveTimer.Start();
|
||||
}
|
||||
@@ -911,6 +916,7 @@ namespace SourceGen {
|
||||
/// </summary>
|
||||
private void PrepareRecoveryFile() {
|
||||
Debug.Assert(mRecoveryStream == null);
|
||||
Debug.Assert(!string.IsNullOrEmpty(mProjectPathName));
|
||||
Debug.Assert(string.IsNullOrEmpty(mRecoveryPathName));
|
||||
|
||||
string pathName = GenerateRecoveryPathName(mProjectPathName);
|
||||
|
||||
Reference in new issue
Block a user