summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-06-07 17:09:24 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-06-09 14:00:02 +0200
commit49db29727ceb25adcf5e428343c81528435e37a8 (patch)
tree19ddaf52559346a3917c575ba26a1abeea7b848f
parent8c7a32ccb9c510e78cdddddc242b8f5c835148a5 (diff)
downloadnextcloud-server-49db29727ceb25adcf5e428343c81528435e37a8.tar.gz
nextcloud-server-49db29727ceb25adcf5e428343c81528435e37a8.zip
make sure $data['mtime'] is always a timestamp
-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 {