Files: explicitly define

remotes/origin/stable5
Robin Appelman 13 years ago
parent 5ef9d96d10
commit 9bdc43e1fc
  1. 2
      apps/files/ajax/move.php
  2. 2
      apps/files/ajax/rename.php

@ -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);

Loading…
Cancel
Save