import: diskPath not sent when importing from xfs and ext4

This commit is contained in:
Girish Ramakrishnan
2022-10-02 10:09:08 +02:00
parent 68c60bf1b7
commit b2e4dc059e
7 changed files with 41 additions and 18 deletions

View File

@@ -1211,7 +1211,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
};
$scope.mountlike = function (provider) {
return provider === 'sshfs' || provider === 'cifs' || provider === 'nfs';
return provider === 'sshfs' || provider === 'cifs' || provider === 'nfs' || provider === 'mountpoint' || provider === 'ext4' || provider === 'xfs';
};
$scope.importBackup = {
@@ -1233,7 +1233,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
remotePath: '',
password: '',
encryptedFilenames: true,
mountOptions: {},
mountOptions: {}, // host, port, username, password, remoteDir, diskPath, user, privateKey
encrypted: false, // helps with ng-required when backupConfig is read from file
clearForm: function () {
@@ -1333,9 +1333,12 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
$scope.importBackup.busy = false;
return;
}
} else if (backupConfig.provider === 'sshfs' || backupConfig.provider === 'cifs' || backupConfig.provider === 'nfs') {
} else if (backupConfig.provider === 'sshfs' || backupConfig.provider === 'cifs' || backupConfig.provider === 'nfs' || backupConfig.provider === 'ext4' || backupConfig.provider === 'xfs') {
backupConfig.mountOptions = $scope.importBackup.mountOptions;
backupConfig.prefix = $scope.importBackup.prefix;
} else if (backupConfig.provider === 'mountpoint') {
backupConfig.mountOptions = {};
backupConfig.mountPoint = $scope.mountPoint;
} else if (backupConfig.provider === 'filesystem') {
var parts = remotePath.split('/');
remotePath = parts.pop() || parts.pop(); // removes any trailing slash. this is basename()