shell: copy over code and signal values from cp object
This commit is contained in:
@@ -177,7 +177,7 @@ async function copy(apiConfig, oldFilePath, newFilePath, progressCallback) {
|
||||
const sshArgs = sshOptions.concat([ 'cp', cpOptions, oldFilePath.replace('/mnt/cloudronbackup/', ''), newFilePath.replace('/mnt/cloudronbackup/', '') ]);
|
||||
const [remoteCopyError] = await safe(shell.execArgs('copy', 'ssh', sshArgs, { shell: true }));
|
||||
if (!remoteCopyError) return;
|
||||
if (remoteCopyError?.code === 255) throw new BoxError(BoxError.EXTERNAL_ERROR, `SSH connection error: ${remoteCopyError.message}`); // do not attempt fallback copy for ssh errors
|
||||
if (remoteCopyError.code === 255) throw new BoxError(BoxError.EXTERNAL_ERROR, `SSH connection error: ${remoteCopyError.message}`); // do not attempt fallback copy for ssh errors
|
||||
debug('SSH remote copy failed, trying ssfs copy'); // this can happen for sshfs mounted windows server
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user