From c2f1a6b643b09fc5a095e4c75f437370165cf1e5 Mon Sep 17 00:00:00 2001 From: Mikhail Fesenko Date: Thu, 17 Oct 2019 13:17:13 +0300 Subject: [PATCH] Added clear cache for windows, fix tests --- src/Composer/Util/Filesystem.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php index c025a6b8c..7cdad1df4 100644 --- a/src/Composer/Util/Filesystem.php +++ b/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)