소스 검색

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 12 년 전
부모
커밋
a080ae3a51
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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);