Skip to content

Commit

Permalink
move post-run to after chmod'ing the destination
Browse files Browse the repository at this point in the history
  • Loading branch information
Commifreak committed Mar 17, 2024
1 parent 8b4a9e6 commit 76bd0bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/scripts/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,6 @@
ABHelper::notify("Appdata Backup", "Backup done [$backupDuration]!", "The backup was successful and took $backupDuration!");
}

ABHelper::handlePrePostScript($abSettings->postRunScript, 'post-run', $abDestination, (ABHelper::$errorOccured ? 'false' : 'true'));

if (!empty($abDestination)) {
copy(ABSettings::$tempFolder . '/' . ABSettings::$logfile, $abDestination . '/backup.log');
copy(ABSettings::getConfigPath(), $abDestination . '/' . ABSettings::$settingsFile);
Expand All @@ -390,6 +388,9 @@
exec("chmod u=rwx,g=rx,o=- " . escapeshellarg($abDestination));

}

ABHelper::handlePrePostScript($abSettings->postRunScript, 'post-run', $abDestination, (ABHelper::$errorOccured ? 'false' : 'true'));

if (file_exists(ABSettings::$tempFolder . '/' . ABSettings::$stateFileAbort)) {
unlink(ABSettings::$tempFolder . '/' . ABSettings::$stateFileAbort);
}
Expand Down

0 comments on commit 76bd0bf

Please sign in to comment.