Fix issues in auto-save files:
* auto-save was broken for all sub sheets with are in a sub-directory of the project directory. (reason wxFileName::Normalize(), used to create the absolute path has issues with filenames starting by '$', perhaps due to env var which also start by $). the auto-save prefix is modified ( now AUTOSAVE_PREFIX_FILENAME which defines "_save_" ) and defined only once. * auto-save files from sub-sheets were not found due to the fact the path was not set (fixed by Blair Bonnet's patch)
This commit is contained in:
committed by
jean-pierre charras
parent
d41bc31c49
commit
722435f317
@@ -692,7 +692,7 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
|
||||
wxFileName autoSaveFileName = aFileName;
|
||||
|
||||
// Check for auto save file.
|
||||
autoSaveFileName.SetName( wxT( "$" ) + aFileName.GetName() );
|
||||
autoSaveFileName.SetName( AUTOSAVE_PREFIX_FILENAME + aFileName.GetName() );
|
||||
|
||||
wxLogTrace( traceAutoSave,
|
||||
wxT( "Checking for auto save file " ) + autoSaveFileName.GetFullPath() );
|
||||
@@ -701,9 +701,10 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
|
||||
return;
|
||||
|
||||
wxString msg = wxString::Format( _(
|
||||
"Well this is potentially embarrassing! It appears that the last time "
|
||||
"you were editing the file '%s' it was not saved properly. Do you wish to restore the last "
|
||||
"edits you made?" ),
|
||||
"Well this is potentially embarrassing!\n"
|
||||
"It appears that the last time you were editing the file\n"
|
||||
"'%s'\n"
|
||||
"it was not saved properly. Do you wish to restore the last saved edits you made?" ),
|
||||
GetChars( aFileName.GetFullName() )
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user