Merge pull request #25005 from owncloud/parent-storage-time-cast
don't update storage mtime if we can't get the modified date
This commit is contained in:
commit
87c150e2fb
2 changed files with 7 additions and 1 deletions
|
@ -231,7 +231,10 @@ class Updater implements IUpdater {
|
|||
$parentId = $this->cache->getParentId($internalPath);
|
||||
$parent = dirname($internalPath);
|
||||
if ($parentId != -1) {
|
||||
$this->cache->update($parentId, array('storage_mtime' => $this->storage->filemtime($parent)));
|
||||
$mtime = $this->storage->filemtime($parent);
|
||||
if ($mtime !== false) {
|
||||
$this->cache->update($parentId, array('storage_mtime' => $mtime));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue