]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix fopen
authorRobin Appelman <icewind1991@gmail.com>
Sat, 22 Oct 2011 12:10:15 +0000 (14:10 +0200)
committerRobin Appelman <icewind1991@gmail.com>
Sun, 23 Oct 2011 09:35:29 +0000 (11:35 +0200)
lib/filesystem.php

index 3497431f1ee947a5ff2407b5f1af0b743caaeb7d..cae8ead5b1639e16da4d004c0d747b27ee7204b4 100644 (file)
@@ -366,9 +366,11 @@ class OC_Filesystem{
                        case 'a':
                                $hooks[]='write';
                                break;
+                       default:
+                               OC_Log::write('core','invalid mode ('.$mode.') for '.$path,OC_Log::ERROR);
                }
                
-               return self::basicOperation('fopen',$path,$hooks);
+               return self::basicOperation('fopen',$path,$hooks,$mode);
        }
        static public function toTmpFile($path){
                if(OC_FileProxy::runPreProxies('toTmpFile',$path) and self::canRead($path) and $storage=self::getStorage($path)){