]> source.dussan.org Git - nextcloud-server.git/commitdiff
[Fixing Updater Unit Tests on Windows]
authorThomas Mueller <thomas.mueller@tmit.eu>
Mon, 10 Jun 2013 16:35:47 +0000 (18:35 +0200)
committerThomas Mueller <thomas.mueller@tmit.eu>
Mon, 10 Jun 2013 16:35:47 +0000 (18:35 +0200)
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

lib/files/cache/updater.php

index 417a47f3830d8d9c5575e0630393c0ff1f2e3a1e..bf86596dfb303bbcbb771eb70afb013d1cc7e31f 100644 (file)
@@ -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);
                                }
                        }
                }