[Pkg-owncloud-commits] [owncloud] 100/199: re-use rescursive copy from common storage

David Prévot taffit at moszumanska.debian.org
Sun Jun 1 18:53:14 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 8187164fe1c125c478f1c9f64700626d329aa0d1
Author: Robin Appelman <icewind at owncloud.com>
Date:   Wed Jul 10 21:39:58 2013 +0200

    re-use rescursive copy from common storage
---
 lib/private/files/storage/local.php | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index bbb4ae7..43ffeaf 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -188,22 +188,7 @@ if (\OC_Util::runningOnWindows()) {
 
 		public function copy($path1, $path2) {
 			if ($this->is_dir($path1)) {
-				if ($this->is_dir($path2)) {
-					$this->rmdir($path2);
-				} else if ($this->is_file($path2)) {
-					$this->unlink($path2);
-				}
-				$dir = $this->opendir($path1);
-				$this->mkdir($path2);
-				while ($file = readdir($dir)) {
-					if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
-						if (!$this->copy($path1 . '/' . $file, $path2 . '/' . $file)) {
-							return false;
-						}
-					}
-				}
-				closedir($dir);
-				return true;
+				return parent::copy($path1, $path2);
 			} else {
 				return copy($this->datadir . $path1, $this->datadir . $path2);
 			}

-- 
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