diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-01-15 14:57:23 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-01-15 14:57:23 +0100 |
commit | 9bf367e7f803d6968dc2c639624ce191d538a5bc (patch) | |
tree | 5ef8bec79c46d548d198ca87bbbc9b16974bb5a5 /apps/files/ajax/move.php | |
parent | 3a9ec452729bf9b6a51d36750b095d9ef80a5f7e (diff) | |
parent | bb9cc227c2583adc6b51a1f6d75a9fc8333836b9 (diff) | |
download | nextcloud-server-9bf367e7f803d6968dc2c639624ce191d538a5bc.tar.gz nextcloud-server-9bf367e7f803d6968dc2c639624ce191d538a5bc.zip |
merge master into filesystem
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); |