Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/private/Files/Storage/DAV.php
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ public function stat($path) {
return false;
}
return [
'mtime' => strtotime($response['{DAV:}getlastmodified']),
'mtime' => isset($response['{DAV:}getlastmodified']) ? strtotime($response['{DAV:}getlastmodified']) : null,
'size' => (int)isset($response['{DAV:}getcontentlength']) ? $response['{DAV:}getcontentlength'] : 0,
];
} catch (\Exception $e) {
Expand Down Expand Up @@ -804,9 +804,12 @@ public function hasUpdated($path, $time) {
} else {
return false;
}
} else {
} elseif (isset($response['{DAV:}getlastmodified'])) {
$remoteMtime = strtotime($response['{DAV:}getlastmodified']);
return $remoteMtime > $time;
} else {
// neither `getetag` nor `getlastmodified` is set
return false;
}
} catch (ClientHttpException $e) {
if ($e->getHttpStatus() === 405) {
Expand Down