diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-07-10 21:39:58 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-05-28 18:16:24 +0200 |
commit | 8187164fe1c125c478f1c9f64700626d329aa0d1 (patch) | |
tree | 218f2cb043b48613c081248589d2523c5e6d5bbb /lib | |
parent | 488fc402e4c144692a1a4c84d5cfacaae9bea2b8 (diff) | |
download | nextcloud-server-8187164fe1c125c478f1c9f64700626d329aa0d1.tar.gz nextcloud-server-8187164fe1c125c478f1c9f64700626d329aa0d1.zip |
re-use rescursive copy from common storage
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/storage/local.php | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php index bbb4ae77e4f..43ffeaf80c7 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); } |