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

This commit is contained in:
Robin Appelman 2016-06-07 17:09:24 +02:00 committed by Arthur Schiwon
parent 8c7a32ccb9
commit 49db29727c
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
1 changed files with 3 additions and 0 deletions

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 {