Unable to change Snapshot backup path after site clone

I set a backup destination in my site's root folder. Then I cloned my site using my host's (Pressable) panel. Then Snapshots Pro wasn't able to write to the original folder because it didn't have permissions to that instance in my account. So when I tried to rename the backup folder, it would save changes but when the page reloaded it would still have the old backup directory in the field.

My host already fixed this for us on their end but I thought I'd share their comments for a future update:

2) The plugin's logic for changing the path [has some flaws]. From wp-content/plugins/snapshot/snapshot.php:

`
if ( ( isset( $backupFolder ) ) && ( strlen( $backupFolder ) ) ) {
if ( $_oldbackupFolderFull != $_newbackupFolderFull ) {
$rename_ret = rename( $_oldbackupFolderFull, $_newbackupFolderFull );
if ( $rename_ret === true ) {
$CONFIG_CHANGED = true;

// Now that the physical files have been changed update our settings.
$this->config_data['config']['backupFolder'] = $backupFolder;
$this->set_backup_folder();
$this->set_log_folders();
}
}
}
`

$_oldbackupFolderFull = '/pfstaging/snapshot'
$_newbackupFolderFull = '/pfauth0/snapshot'

The call to PHP function rename() would never succeed (it sets $rename_ret to 'false':wink: because the $_oldbackupFolderFull folder doesn't exist. This then causes the code to fall through all of the conditional logic, and set_backup_folder() never gets called.

So the problems here are multiple: 1) makes assumption that $_oldbackupFolderFull exists without actually checking 2) fails to handle the case where rename fails, 3) assumes that renaming the folder is the desired action - what if one simply wishes to change it?

I've fixed the issue by renaming the backupFolder with the plugins settings in wp_options.

Thanks,

Jeff