Skip to content
Snippets Groups Projects
Commit 9bdc43e1 authored by Robin Appelman's avatar Robin Appelman
Browse files

Files: explicitly define

parent 5ef9d96d
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,8 @@ $dir = stripslashes($_POST["dir"]);
$file = stripslashes($_POST["file"]);
$target = stripslashes(rawurldecode($_POST["target"]));
$l = OC_L10N::get('files');
if(\OC\Files\Filesystem::file_exists($target . '/' . $file)) {
OCP\JSON::error(array("data" => array( "message" => $l->t("Could not move %s - File with this name already exists", array($file)) )));
exit;
......
......@@ -11,6 +11,8 @@ $dir = stripslashes($_GET["dir"]);
$file = stripslashes($_GET["file"]);
$newname = stripslashes($_GET["newname"]);
$l = OC_L10N::get('files');
if ( $newname !== '.' and ($dir != '' || $file != 'Shared') and $newname !== '.') {
$targetFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $newname);
$sourceFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment