mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
[Fixing Updater Unit Tests on Windows]
using $internalPath within call to self::correctFolder() because $path inside of it is not processed properly due to directory separator on Windows. error logging has been added in case the given 4path is not found within self::correctFolder
This commit is contained in:
parent
988b539dd7
commit
073306eaa2
1 changed files with 4 additions and 1 deletions
5
lib/files/cache/updater.php
vendored
5
lib/files/cache/updater.php
vendored
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
namespace OC\Files\Cache;
|
||||
use OCP\Util;
|
||||
|
||||
/**
|
||||
* listen to filesystem hooks and change the cache accordingly
|
||||
|
|
@ -40,7 +41,7 @@ class Updater {
|
|||
$scanner = $storage->getScanner($internalPath);
|
||||
$scanner->scan($internalPath, Scanner::SCAN_SHALLOW);
|
||||
$cache->correctFolderSize($internalPath);
|
||||
self::correctFolder($path, $storage->filemtime($internalPath));
|
||||
self::correctFolder($internalPath, $storage->filemtime($internalPath));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -116,6 +117,8 @@ class Updater {
|
|||
if ($id !== -1) {
|
||||
$cache->update($id, array('mtime' => $time, 'etag' => $storage->getETag($internalPath)));
|
||||
self::correctFolder($parent, $time);
|
||||
} else {
|
||||
Util::writeLog('core', 'Path not in cache: '.$internalPath, Util::ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue