From: Robin Appelman Date: Wed, 16 May 2012 23:47:58 +0000 (+0200) Subject: when scanning a folder that is a mountpoint, use the root of the mount for checking... X-Git-Tag: v4.0.0RC2~29 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c1ba4deb72cf1515ed000453cc6b31fac56f5f96;p=nextcloud-server.git when scanning a folder that is a mountpoint, use the root of the mount for checking if a folder is writable instead of the folder --- diff --git a/lib/filecache.php b/lib/filecache.php index 9ec307cc812..a94349e19cb 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -564,9 +564,13 @@ class OC_FileCache{ } if(!$view->is_readable($path)) return; //cant read, nothing we can do clearstatcache(); - $stat=$view->stat($path); $mimetype=$view->getMimeType($path); - $writable=$view->is_writable($path); + $stat=$view->stat($path); + if($mimetype=='httpd/unix-directory'){ + $writable=$view->is_writable($path.'/'); + }else{ + $writable=$view->is_writable($path); + } $stat['mimetype']=$mimetype; $stat['writable']=$writable; if($path=='/'){