Fix for allfinfo and parsStat for non Windows Fileservers

Small update
This commit is contained in:
root 2015-04-03 11:40:04 +02:00
commit 286024db74
2 changed files with 11 additions and 0 deletions

View file

@ -120,6 +120,12 @@ class Share implements IShare {
public function stat($path) {
$escapedPath = $this->escapePath($path);
$output = $this->execute('allinfo ' . $escapedPath);
// Windows and non Windows Fileserver may respond different
// to the allinfo command for directories. If the result is a single
// line = error line, redo it with a different allinfo parameter
if ($escapedPath == '""' && count($output) < 2) {
$output = $this->execute('allinfo ' . '"."');
}
if (count($output) < 3) {
$this->parseOutput($output, $path);
}