]> source.dussan.org Git - nextcloud-server.git/commitdiff
Correct local permissions checks
authorMichael Gapczynski <GapczynskiM@gmail.com>
Mon, 2 Jan 2012 00:59:24 +0000 (19:59 -0500)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Mon, 2 Jan 2012 00:59:24 +0000 (19:59 -0500)
lib/filestorage/local.php
lib/filesystem.php

index 02746fa6c6fc4471bbbdfcb64b736dcb24e4afba..cfc27159786e5844638a55237eb93a7b01342be5 100644 (file)
@@ -50,10 +50,10 @@ class OC_Filestorage_Local extends OC_Filestorage{
                }
        }
        public function is_readable($path){
-               return true;
+               return is_readable($this->datadir.$path);
        }
        public function is_writeable($path){
-               return true;
+               return is_writable($this->datadir.$path);
        }
        public function file_exists($path){
                return file_exists($this->datadir.$path);
index 9b3dde1ae0723cdd41061821d6bd5a14cf8dc4c6..1205a6aa51b23a536afa9f343e91657a401f14b1 100644 (file)
@@ -245,7 +245,7 @@ class OC_Filesystem{
                        return false;
                }
                $storage=self::getStorage($path);
-               return $storage->is_readable($path);
+               return $storage->is_readable(self::getInternalPath($path));
        }
        static public function is_writeable($path){
                if(substr($path,0,1)!=='/'){
@@ -255,7 +255,7 @@ class OC_Filesystem{
                        return false;
                }
                $storage=self::getStorage($path);
-               return $storage->is_writeable($path);
+               return $storage->is_writeable(self::getInternalPath($path));
        }
        static public function file_exists($path){
                if($path=='/'){