Explorar o código

Make sure directories we are downloading to are empty

We already clear them on error anyway and usually they should be
empty, but just to be safe.
Nils Adermann %!s(int64=12) %!d(string=hai) anos
pai
achega
a080ae3a51
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/Composer/Downloader/FileDownloader.php

+ 1 - 0
src/Composer/Downloader/FileDownloader.php

@@ -79,6 +79,7 @@ class FileDownloader implements DownloaderInterface
             throw new \InvalidArgumentException('The given package is missing url information');
         }
 
+        $this->filesystem->removeDirectory($path);
         $this->filesystem->ensureDirectoryExists($path);
 
         $fileName = $this->getFileName($package, $path);