no need for format specific getBackupFilePath
This commit is contained in:
@@ -30,7 +30,9 @@ exports = module.exports = {
|
||||
getMountStatus,
|
||||
ensureMounted,
|
||||
|
||||
storageApi
|
||||
storageApi,
|
||||
|
||||
getBackupFilePath
|
||||
};
|
||||
|
||||
const assert = require('assert'),
|
||||
@@ -97,6 +99,16 @@ function storageApi(backupTarget) {
|
||||
}
|
||||
}
|
||||
|
||||
function getBackupFilePath(backupTarget, remotePath) {
|
||||
assert.strictEqual(typeof backupTarget, 'object');
|
||||
assert.strictEqual(typeof remotePath, 'string');
|
||||
|
||||
// we don't have a rootPath for noop
|
||||
if (backupTarget.provider === 'noop') return remotePath;
|
||||
|
||||
return path.join(backupTarget.config.rootPath, remotePath);
|
||||
}
|
||||
|
||||
function getRootPath(provider, config, mountPath) {
|
||||
assert.strictEqual(typeof config, 'object');
|
||||
assert.strictEqual(typeof mountPath, 'string');
|
||||
|
||||
Reference in New Issue
Block a user