]> source.dussan.org Git - nextcloud-server.git/commitdiff
make local filestorage comply with test cases
authorRobin Appelman <icewind@owncloud.com>
Mon, 13 Feb 2012 09:27:00 +0000 (10:27 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Tue, 14 Feb 2012 00:00:41 +0000 (01:00 +0100)
lib/filestorage/local.php

index 292d2a84e7dfd6fa7704cbdeb447d09d53597c58..2e66943cad2e2d38c8e985ed79a3bca26f05b1ae 100644 (file)
@@ -12,14 +12,10 @@ class OC_Filestorage_Local extends OC_Filestorage{
                }
        }
        public function mkdir($path){
-               if($return=mkdir($this->datadir.$path)){
-               }
-               return $return;
+               return @mkdir($this->datadir.$path);
        }
        public function rmdir($path){
-               if($return=rmdir($this->datadir.$path)){
-               }
-               return $return;
+               return @rmdir($this->datadir.$path);
        }
        public function opendir($path){
                return opendir($this->datadir.$path);
@@ -80,8 +76,7 @@ class OC_Filestorage_Local extends OC_Filestorage{
                }
        }
        public function unlink($path){
-               $return=$this->delTree($path);
-               return $return;
+               return $this->delTree($path);
        }
        public function rename($path1,$path2){
                if(! $this->file_exists($path1)){
@@ -168,6 +163,8 @@ class OC_Filestorage_Local extends OC_Filestorage{
                                $mimeType=(isset(self::$mimetypes[$extention]))?self::$mimetypes[$extention]:'application/octet-stream';
                        }
                        return $mimeType;
+               }else{
+                       return false;
                }
        }