Skip file moving if location unchanged
This commit is contained in:
@@ -223,6 +223,8 @@ app.controller('FileManagerController', ['$scope', '$timeout', 'Client', functio
|
||||
var oldFilePath = sanitize($scope.cwd + '/' + dataTransfer.getData('application/cloudron-filemanager'));
|
||||
var newFilePath = sanitize(targetFolder + '/' + dataTransfer.getData('application/cloudron-filemanager'));
|
||||
|
||||
if (oldFilePath === newFilePath) return;
|
||||
|
||||
return Client.filesRename($scope.id, $scope.type, oldFilePath, newFilePath, function (error) {
|
||||
if (error) return Client.error(error);
|
||||
$scope.refresh();
|
||||
|
||||
Reference in New Issue
Block a user