зеркало из https://github.com/nextcloud/server.git
don't move file into subdirectory if a file with the same name already exists (fixes #92)
This commit is contained in:
Родитель
be215a097a
Коммит
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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче