check if we can read the file before trying to get it's mime type
This commit is contained in:
parent
9cd4c99918
commit
15d15104d4
|
@ -208,6 +208,7 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
|
|||
}
|
||||
|
||||
public function getMimeType($fspath){
|
||||
if($this->is_readable($fspath)){
|
||||
if (@is_dir($this->datadir.$fspath)) {
|
||||
// directories are easy
|
||||
return "httpd/unix-directory";
|
||||
|
@ -297,6 +298,7 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
|
|||
|
||||
return $mime_type;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* detect if a given program is found in the search PATH
|
||||
|
|
Loading…
Reference in New Issue