diff options
Diffstat (limited to 'apps/files/ajax/move.php')
-rw-r--r-- | apps/files/ajax/move.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php index d4eacd962a0..7c1ec974a3d 100644 --- a/apps/files/ajax/move.php +++ b/apps/files/ajax/move.php @@ -11,6 +11,11 @@ $dir = stripslashes($_GET["dir"]); $file = stripslashes($_GET["file"]); $target = stripslashes(rawurldecode($_GET["target"])); +if(\OC\Files\Filesystem::file_exists($target . '/' . $file)) { + OCP\JSON::error(array("data" => array( "message" => "Could not move $file - File with this name already exists" ))); + exit; +} + if ($dir != '' || $file != 'Shared') { $targetFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file); $sourceFile = \OC\Files\Filesystem::normalizePath($target . '/' . $file); |