Merge pull request #4800 from heewa/abort-save-when-unable-to-finish
App: Abort save when unable to finish
This commit is contained in:
@@ -2401,8 +2401,8 @@ private:
|
||||
|
||||
Base::FileInfo tmp(sourcename);
|
||||
if (tmp.renameFile(targetname.c_str()) == false) {
|
||||
Base::Console().Warning("Cannot rename file from '%s' to '%s'\n",
|
||||
sourcename.c_str(), targetname.c_str());
|
||||
throw Base::FileException(
|
||||
"Cannot rename tmp save file to project file", targetname);
|
||||
}
|
||||
}
|
||||
void applyTimeStamp(const std::string& sourcename, const std::string& targetname) {
|
||||
@@ -2534,9 +2534,8 @@ private:
|
||||
|
||||
Base::FileInfo tmp(sourcename);
|
||||
if (tmp.renameFile(targetname.c_str()) == false) {
|
||||
Base::Console().Error("Save interrupted: Cannot rename file from '%s' to '%s'\n",
|
||||
sourcename.c_str(), targetname.c_str());
|
||||
//throw Base::FileException("Save interrupted: Cannot rename temporary file to project file", tmp);
|
||||
throw Base::FileException(
|
||||
"Save interrupted: Cannot rename temporary file to project file", tmp);
|
||||
}
|
||||
|
||||
if (numberOfFiles <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user