Merge pull request #9550 from kofemann/dcache-fixes-for-upstream
storage: do not check file mode on rename
This commit is contained in:
commit
d58c8d72cf
|
@ -172,10 +172,19 @@ if (\OC_Util::runningOnWindows()) {
|
|||
}
|
||||
|
||||
public function rename($path1, $path2) {
|
||||
if (!$this->isUpdatable($path1)) {
|
||||
\OC_Log::write('core', 'unable to rename, file is not writable : ' . $path1, \OC_Log::ERROR);
|
||||
$srcParent = dirname($path1);
|
||||
$dstParent = dirname($path2);
|
||||
|
||||
if (!$this->isUpdatable($srcParent)) {
|
||||
\OC_Log::write('core', 'unable to rename, source directory is not writable : ' . $srcParent, \OC_Log::ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->isUpdatable($dstParent)) {
|
||||
\OC_Log::write('core', 'unable to rename, destination directory is not writable : ' . $dstParent, \OC_Log::ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->file_exists($path1)) {
|
||||
\OC_Log::write('core', 'unable to rename, file does not exists : ' . $path1, \OC_Log::ERROR);
|
||||
return false;
|
||||
|
|
|
@ -184,10 +184,19 @@ class MappedLocal extends \OC\Files\Storage\Common {
|
|||
}
|
||||
|
||||
public function rename($path1, $path2) {
|
||||
if (!$this->isUpdatable($path1)) {
|
||||
\OC_Log::write('core', 'unable to rename, file is not writable : ' . $path1, \OC_Log::ERROR);
|
||||
$srcParent = dirname($path1);
|
||||
$dstParent = dirname($path2);
|
||||
|
||||
if (!$this->isUpdatable($srcParent)) {
|
||||
\OC_Log::write('core', 'unable to rename, source directory is not writable : ' . $srcParent, \OC_Log::ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->isUpdatable($dstParent)) {
|
||||
\OC_Log::write('core', 'unable to rename, destination directory is not writable : ' . $dstParent, \OC_Log::ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->file_exists($path1)) {
|
||||
\OC_Log::write('core', 'unable to rename, file does not exists : ' . $path1, \OC_Log::ERROR);
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue