From c1ba4deb72cf1515ed000453cc6b31fac56f5f96 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 17 May 2012 01:47:58 +0200 Subject: [PATCH] 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 --- lib/filecache.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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=='/'){ -- 2.39.5