From c917c52f8107f5348fa4a060e136623f982062c1 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 16 May 2017 22:44:25 +0200 Subject: [PATCH] Message tweak, refs #6341 --- src/Composer/Downloader/ZipDownloader.php | 4 ++-- tests/Composer/Test/Downloader/ZipDownloaderTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Composer/Downloader/ZipDownloader.php b/src/Composer/Downloader/ZipDownloader.php index c4b5c7aa4..f32cf6a30 100644 --- a/src/Composer/Downloader/ZipDownloader.php +++ b/src/Composer/Downloader/ZipDownloader.php @@ -156,8 +156,8 @@ class ZipDownloader extends ArchiveDownloader } else { $processError = new \UnexpectedValueException(rtrim($this->getErrorMessage($retval, $file)."\n"), $retval); } - } catch (\ErrorException $ex) { - $processError = new \ErrorException('Archive may contain identical directory or file name with different capitalization (fails on case insensitive filesystems)'); + } catch (\ErrorException $e) { + $processError = new \RuntimeException('The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): '.$e->getMessage(), 0, $e); } catch (\Exception $e) { $processError = $e; } diff --git a/tests/Composer/Test/Downloader/ZipDownloaderTest.php b/tests/Composer/Test/Downloader/ZipDownloaderTest.php index 9b97a593d..041116bc7 100644 --- a/tests/Composer/Test/Downloader/ZipDownloaderTest.php +++ b/tests/Composer/Test/Downloader/ZipDownloaderTest.php @@ -128,8 +128,8 @@ class ZipDownloaderTest extends TestCase } /** - * @expectedException \ErrorException - * @expectedExceptionMessage Archive may contain identical directory or file name with different capitalization (fails on case insensitive filesystems) + * @expectedException \RuntimeException + * @expectedExceptionMessage The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): Not a directory */ public function testZipArchiveExtractOnlyFailed() {