[Pkg-owncloud-commits] [owncloud] 244/394: fix the delete all function, no need to add user to the path, fixed broken function calls

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:12:16 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit 03494145d478bd44dd49ec79ef40433dec22cab8
Author: Björn Schießle <schiessle at owncloud.com>
Date:   Wed Dec 19 15:13:02 2012 +0100

    fix the delete all function, no need to add user to the path, fixed broken function calls
---
 lib/filestorage/common.php |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php
index 3517144..9e3d02b 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
 
 					}
 				}

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