summaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-06-07 17:09:24 +0200
committerRobin Appelman <icewind@owncloud.com>2016-06-07 17:09:24 +0200
commit2cf7ad8c55e20b388c8b5bc56fb343273346b6e2 (patch)
tree352acda830db84b0787c8bc88bb850b2d48049f8 /lib/private/Files
parent6822689e381b12df035384b6b25ff8d07e6b57a3 (diff)
downloadnextcloud-server-2cf7ad8c55e20b388c8b5bc56fb343273346b6e2.tar.gz
nextcloud-server-2cf7ad8c55e20b388c8b5bc56fb343273346b6e2.zip
make sure $data['mtime'] is always a timestamp
Diffstat (limited to 'lib/private/Files')
-rw-r--r--lib/private/Files/Storage/Common.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index cec6a42a2c0..0c1b69108d4 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -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 {