don't move file into subdirectory if a file with the same name already exists (fixes #92)
This commit is contained in:
parent
be215a097a
commit
4fd0514f0a
|
@ -12,6 +12,11 @@ $file = stripslashes($_GET["file"]);
|
|||
$target = stripslashes(urldecode($_GET["target"]));
|
||||
|
||||
|
||||
if(OC_Filesystem::file_exists($target . '/' . $file)){
|
||||
OCP\JSON::error(array("data" => array( "message" => "Could not move $file - File with this name already exists" )));
|
||||
exit;
|
||||
}
|
||||
|
||||
if(OC_Files::move($dir, $file, $target, $file)) {
|
||||
OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $file )));
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue