summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-12-19 15:13:02 +0100
committerBjörn Schießle <schiessle@owncloud.com>2012-12-19 15:13:02 +0100
commit03494145d478bd44dd49ec79ef40433dec22cab8 (patch)
treeb9490fcc1f2035948e9559849ef417ac555ea1fe /lib
parenta5a25eb2a81dc2bc6fe4be8fe6766d7a82989516 (diff)
downloadnextcloud-server-03494145d478bd44dd49ec79ef40433dec22cab8.tar.gz
nextcloud-server-03494145d478bd44dd49ec79ef40433dec22cab8.zip
fix the delete all function, no need to add user to the path, fixed broken function calls
Diffstat (limited to 'lib')
-rw-r--r--lib/filestorage/common.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php
index 351714437c5..9e3d02b40eb 100644
--- a/lib/filestorage/common.php
+++ b/lib/filestorage/common.php
@@ -134,17 +134,17 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
}
- if ( !$this->file_exists( \OCP\USER::getUser() . '/' . $directory ) || !$this->is_dir( \OCP\USER::getUser() . '/' . $directory ) ) {
+ if ( !$this->file_exists( $directory ) || !$this->is_dir( $directory ) ) {
return false;
- } elseif( !$this->is_readable( \OCP\USER::getUser() . '/' . $directory ) ) {
+ } elseif( !$this->isReadable( $directory ) ) {
return false;
} else {
- $directoryHandle = $this->opendir( \OCP\USER::getUser() . '/' . $directory );
+ $directoryHandle = $this->opendir( $directory );
while ( $contents = readdir( $directoryHandle ) ) {
@@ -154,11 +154,11 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
if ( $this->is_dir( $path ) ) {
- deleteAll( $path );
+ $this->deleteAll( $path );
} else {
- $this->unlink( \OCP\USER::getUser() .'/' . $path ); // TODO: make unlink use same system path as is_dir
+ $this->unlink( $path ); // TODO: make unlink use same system path as is_dir
}
}