From b3dc94b5befb172cf7a56df3e7812a30da881bc6 Mon Sep 17 00:00:00 2001 From: NadirRoGue Date: Wed, 20 Apr 2016 09:59:39 +0200 Subject: [PATCH] [Patch] Use ctime when mtime is not available --- lib/private/files/objectstore/eosparser.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/private/files/objectstore/eosparser.php b/lib/private/files/objectstore/eosparser.php index 0505b9f2e319..0312961bb18d 100644 --- a/lib/private/files/objectstore/eosparser.php +++ b/lib/private/files/objectstore/eosparser.php @@ -47,8 +47,18 @@ public static function parseFileInfoMonitorMode($line_to_parse) { $data = array(); $data['fileid'] = $info['ino']; $data['etag'] = $info['etag']; - $data['mtime'] = $info['mtime']; - $data['storage_mtime'] = $info['mtime'];//KUBA: what is a difference: mtime vs storage_mtime + + $mtimeTest = $info['mtime']; + if($mtimeTest === '0.0') + { + $data['mtime'] = $info['ctime']; + $data['storage_mtime'] = $info['ctime'];//KUBA: what is a difference: mtime vs storage_mtime + } + else + { + $data['mtime'] = $mtimeTest; + $data['storage_mtime'] = $mtimeTest;//KUBA: what is a difference: mtime vs storage_mtime + } $data['size'] = isset($info['size']) ? $info['size'] : 0; $data['name'] = $pathinfo['basename']; // if the path is in the trashbin we return false