use constant

This commit is contained in:
Girish Ramakrishnan
2024-07-30 11:00:50 +02:00
parent c9fe08e7b7
commit 247309e11b

View File

@@ -171,7 +171,7 @@ async function copy(apiConfig, oldFilePath, newFilePath, progressCallback) {
cpOptions += apiConfig.noHardlinks ? '' : 'l'; // this will hardlink backups saving space
if (apiConfig.provider === PROVIDER_SSHFS) {
const identityFilePath = `/home/yellowtent/platformdata/sshfs/id_rsa_${apiConfig.mountOptions.host}`;
const identityFilePath = path.join(paths.SSHFS_KEYS_DIR, `id_rsa_${apiConfig.mountOptions.host}`);
const sshOptions = [ '-o', '"StrictHostKeyChecking no"', '-i', identityFilePath, '-p', apiConfig.mountOptions.port, `${apiConfig.mountOptions.user}@${apiConfig.mountOptions.host}` ];
const sshArgs = sshOptions.concat([ 'cp', cpOptions, oldFilePath.replace('/mnt/cloudronbackup/', ''), newFilePath.replace('/mnt/cloudronbackup/', '') ]);