1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 08:09:32 +02:00

Graceful failure saving to thumb drive... (#649)

... If renaming of the file (to a place on a different device) fails,
recover correctly before giving the warning message
This commit is contained in:
Paul Licameli 2020-08-28 12:19:37 -04:00 committed by GitHub
parent 22c00fab03
commit 29f3361746
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1903,6 +1903,12 @@ bool ProjectFileIO::SaveProject(const FilePath &fileName, const std::shared_ptr<
OpenConnection(savedName);
}
}
else {
// Rename can fail -- if it's to a different device, requiring
// real copy of contents, which might exhaust space
OpenConnection(savedName);
return false;
}
}
}