Explorar o código

Added clear cache for windows, fix tests

Mikhail Fesenko %!s(int64=5) %!d(string=hai) anos
pai
achega
c2f1a6b643
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      src/Composer/Util/Filesystem.php

+ 4 - 2
src/Composer/Util/Filesystem.php

@@ -682,12 +682,14 @@ class Filesystem
         if (!Platform::isWindows()) {
             return false;
         }
+
+        // Important to clear all caches first
+        clearstatcache(true, $junction);
+
         if (!is_dir($junction) || is_link($junction)) {
             return false;
         }
 
-        // Important to clear all caches first
-        clearstatcache(true, $junction);
         $stat = lstat($junction);
 
         // S_ISDIR test (S_IFDIR is 0x4000, S_IFMT is 0xF000 bitmask)