Browse Source

Merge pull request #5596 from nextcloud/mount-rename

Fix renaming of non-renamble mounts
pull/5825/head
Morris Jobke 8 years ago
committed by GitHub
parent
commit
655c26224b
  1. 5
      core/js/files/client.js
  2. 6
      lib/private/Files/View.php

5
core/js/files/client.js

@ -331,11 +331,10 @@
case 'C':
case 'K':
data.permissions |= OC.PERMISSION_CREATE;
if (!isFile) {
data.permissions |= OC.PERMISSION_UPDATE;
}
break;
case 'W':
case 'N':
case 'V':
data.permissions |= OC.PERMISSION_UPDATE;
break;
case 'D':

6
lib/private/Files/View.php

@ -770,7 +770,8 @@ class View {
$this->changeLock($path1, ILockingProvider::LOCK_EXCLUSIVE, true);
$this->changeLock($path2, ILockingProvider::LOCK_EXCLUSIVE, true);
if ($internalPath1 === '' and $mount1 instanceof MoveableMount) {
if ($internalPath1 === '') {
if ($mount1 instanceof MoveableMount) {
if ($this->isTargetAllowed($absolutePath2)) {
/**
* @var \OC\Files\Mount\MountPoint | \OC\Files\Mount\MoveableMount $mount1
@ -781,6 +782,9 @@ class View {
} else {
$result = false;
}
} else {
$result = false;
}
// moving a file/folder within the same mount point
} elseif ($storage1 === $storage2) {
if ($storage1) {

Loading…
Cancel
Save