mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-04-13 06:51:05 -05:00
Don't try to move if there's no need to do so
This commit is contained in:
@@ -197,6 +197,9 @@ namespace linuxdeploy {
|
||||
// FIXME: try to find a way how to rewrap AppRun on subsequent runs or, even better, become idempotent
|
||||
if (bf::exists(wrappedAppRunPath)) {
|
||||
ldLog() << LD_WARNING << "Already found wrapped AppRun, using existing file/symlink" << std::endl;
|
||||
} else {
|
||||
// backup original AppRun
|
||||
bf::rename(appRunPath, wrappedAppRunPath);
|
||||
}
|
||||
|
||||
// in case the above check triggered a warning, it's possible that there is another AppRun in the AppDir
|
||||
@@ -207,9 +210,6 @@ namespace linuxdeploy {
|
||||
bf::remove(appRunPath);
|
||||
}
|
||||
|
||||
// backup original AppRun
|
||||
bf::rename(appRunPath, wrappedAppRunPath);
|
||||
|
||||
|
||||
// install new script
|
||||
std::ofstream ofs(appRunPath.string());
|
||||
|
||||
Reference in New Issue
Block a user