Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
use stat to determine has updated
  • Loading branch information
butonic authored and LukasReschke committed Aug 29, 2016
commit f0ddca0963b9ae4170a32d160668d519e32ccf14
8 changes: 4 additions & 4 deletions apps/files_external/lib/smb.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@ public function unlink($path) {
*/
public function hasUpdated($path, $time) {
$this->log('enter: '.__FUNCTION__."($path, $time)");
if (!$path and $this->root == '/') {
// mtime doesn't work for shares, but giving the nature of the backend,
// doing a full update is still just fast enough
$result = true;
$stat = $this->stat($path);
if ($stat === false) {
Util::writeLog('wnd', 'hasUpdated failed -> storage not available', Util::ERROR);
throw $this->leave(__FUNCTION__, new StorageNotAvailableException());
} else {
$actualTime = $this->filemtime($path);
$result = $actualTime > $time;
Expand Down