make sure $data['mtime'] is always a timestamp

This commit is contained in:
Robin Appelman 2016-06-07 17:09:24 +02:00
parent 6822689e38
commit 2cf7ad8c55

View file

@ -643,6 +643,9 @@ abstract class Common implements Storage, ILockingStorage {
$data = [];
$data['mimetype'] = $this->getMimeType($path);
$data['mtime'] = $this->filemtime($path);
if ($data['mtime'] === false) {
$data['mtime'] = time();
}
if ($data['mimetype'] == 'httpd/unix-directory') {
$data['size'] = -1; //unknown
} else {