Skip to content
Snippets Groups Projects
Commit a1f4a060 authored by Robin Appelman's avatar Robin Appelman
Browse files

Fix hasUpdated for folders in swift backend

parent 3d7aff84
No related branches found
No related tags found
No related merge requests found
......@@ -509,6 +509,28 @@ class Swift extends \OC\Files\Storage\Common {
unlink($tmpFile);
}
public function hasUpdated($path, $time) {
if ($this->is_file($path)) {
return parent::hasUpdated($path, $time);
}
$path = $this->normalizePath($path);
$dh = $this->opendir($path);
$content = array();
while (($file = readdir($dh)) !== false) {
$content[] = $file;
}
if ($path === '.') {
$path = '';
}
$cachedContent = $this->getCache()->getFolderContents($path);
$cachedNames = array_map(function ($content) {
return $content['name'];
}, $cachedContent);
sort($cachedNames);
sort($content);
return $cachedNames != $content;
}
/**
* check if curl is installed
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment