Open Poltavtcev opened 7 months ago
Here - the corrections didn't help. Perhaps I don't understand how this should work? How do I test it:
I place the folder with the script in a subfolder of my project. For example, /update. In the config, I specify the path $config["update_folder"] = "../"; After updating - the script does not see the backup folder....
I looked over the readme and was probably not clear on what update_folder means.
Update folder points to the base of your application, in other words, where the files you wish to update are located. So, your backups should be located at ../backups meaning it would be in the parent folder of the update folder.
That said, I am a little unsure if there is a bug that deals with Windows vs Linux. Can you tell me what OS and server you are using?
Noted another inconsistency (?). The backup creation paths and backup checking paths are different.
For example, in the function
public function BackupFiles()
, the backup path is formed to the folder from which the script is launched:$filename = __DIR__."/backups/backup-$currentVersion.zip";
However, in the backup checking functions
CheckForBackups
andChooseBackupFile
, it is formed from the updating folder:$backupFolder = join(DIRECTORY_SEPARATOR,array($updateFolder,"backups","backup-*.zip"));
Is this the correct approach? In any case, the script doesn't seem to detect the backups for me.