Skip to content

Commit

Permalink
[Patch] Use ctime when mtime is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
NadirRoGue committed Apr 20, 2016
1 parent f08ba2d commit b3dc94b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/private/files/objectstore/eosparser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b3dc94b

Please sign in to comment.