Browse Source

escape filenames for getMimeType

remotes/origin/stable4
Robin Appelman 14 years ago
parent
commit
3a937f79f7
  1. 1
      lib/filestorage/local.php

1
lib/filestorage/local.php

@ -140,6 +140,7 @@ class OC_Filestorage_Local extends OC_Filestorage{
} else if (OC_Helper::canExecute("file")) {
// it looks like we have a 'file' command,
// lets see it it does have mime support
$fspath=str_replace("'","\'",$fspath);
$fp = popen("file -i -b '{$this->datadir}$fspath' 2>/dev/null", "r");
$reply = fgets($fp);
pclose($fp);

Loading…
Cancel
Save