check for view before trying to invoke method on object

This commit is contained in:
Bartek Przybylski 2012-06-13 00:32:44 +02:00
parent 521294d0bf
commit db1353655b
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ class OC_Filesystem{
if(substr($mountpoint,-1)!=='/'){
$mountpoint=$mountpoint.'/';
}
if ($mountpoint != '/' && !self::is_dir(basename($mountpoint))) {
if (self::getView() != null && $mountpoint != '/' && !self::is_dir(basename($mountpoint))) {
self::mkdir(basename($mountpoint));
}
self::$mounts[$mountpoint]=array('class'=>$class,'arguments'=>$arguments);