[Pkg-owncloud-commits] [owncloud] 42/59: Revert "files: storage: rename should check parent directories of old and new files"
David Prévot
taffit at moszumanska.debian.org
Fri Jul 18 16:19:29 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 36039ca0c3dcaf4cb07d93aa9d786c8ed6360900
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Thu Jul 17 09:57:08 2014 +0200
Revert "files: storage: rename should check parent directories of old and new files"
This reverts commit a163b185ab03bd9816766250c6ae06df38625261.
---
lib/private/files/storage/local.php | 13 ++-----------
lib/private/files/storage/mappedlocal.php | 13 ++-----------
2 files changed, 4 insertions(+), 22 deletions(-)
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index 63570d7..e33747b 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -172,19 +172,10 @@ if (\OC_Util::runningOnWindows()) {
}
public function rename($path1, $path2) {
- $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);
+ if (!$this->isUpdatable($path1)) {
+ \OC_Log::write('core', 'unable to rename, file is not writable : ' . $path1, \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;
diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php
index 6910eef..ea4deaa 100644
--- a/lib/private/files/storage/mappedlocal.php
+++ b/lib/private/files/storage/mappedlocal.php
@@ -184,19 +184,10 @@ class MappedLocal extends \OC\Files\Storage\Common {
}
public function rename($path1, $path2) {
- $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);
+ if (!$this->isUpdatable($path1)) {
+ \OC_Log::write('core', 'unable to rename, file is not writable : ' . $path1, \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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list