aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/storage')
-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) {