summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/local.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-07-01 17:41:49 +0200
committerRobin Appelman <icewind@owncloud.com>2014-05-28 18:16:23 +0200
commite83b41493fe28eca612f3993a5a1cc3e44e9c145 (patch)
tree6e601df83ceb247a24a1d68aea89d5b503919de4 /lib/private/files/storage/local.php
parentc99e254178c52a568e4070fadab894d321efa6bf (diff)
downloadnextcloud-server-e83b41493fe28eca612f3993a5a1cc3e44e9c145.tar.gz
nextcloud-server-e83b41493fe28eca612f3993a5a1cc3e44e9c145.zip
remove unneeded delTree
Diffstat (limited to 'lib/private/files/storage/local.php')
-rw-r--r--lib/private/files/storage/local.php26
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index de940fc7cdb..aaa9f3c858e 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -164,7 +164,7 @@ if (\OC_Util::runningOnWindows()) {
}
public function unlink($path) {
- return $this->delTree($path);
+ return unlink($this->datadir . $path);
}
public function rename($path1, $path2) {
@@ -213,30 +213,6 @@ if (\OC_Util::runningOnWindows()) {
}
/**
- * @param string $dir
- */
- private function delTree($dir) {
- $dirRelative = $dir;
- $dir = $this->datadir . $dir;
- if (!file_exists($dir)) return true;
- if (!is_dir($dir) || is_link($dir)) return unlink($dir);
- foreach (scandir($dir) as $item) {
- if ($item == '.' || $item == '..') continue;
- if (is_file($dir . '/' . $item)) {
- if (unlink($dir . '/' . $item)) {
- }
- } elseif (is_dir($dir . '/' . $item)) {
- if (!$this->delTree($dirRelative . "/" . $item)) {
- return false;
- };
- }
- }
- if ($return = rmdir($dir)) {
- }
- return $return;
- }
-
- /**
* @param string $fullPath
*/
private static function getFileSizeFromOS($fullPath) {