diff --git a/src/js/filemanager.js b/src/js/filemanager.js index 84cc6ddd0..43a13c6eb 100644 --- a/src/js/filemanager.js +++ b/src/js/filemanager.js @@ -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();