@@ -102,7 +102,7 @@ public function mkdir($dirs, $mode = 0777)
102102 if (!is_dir ($ dir )) {
103103 // The directory was not created by a concurrent process. Let's throw an exception with a developer friendly error message if we have one
104104 if (self ::$ lastError ) {
105- throw new IOException (sprintf ('Failed to create "%s": %s. ' , $ dir , self ::$ lastError ), 0 , null , $ dir );
105+ throw new IOException (sprintf ('Failed to create "%s": ' . self ::$ lastError, $ dir ), 0 , null , $ dir );
106106 }
107107 throw new IOException (sprintf ('Failed to create "%s". ' , $ dir ), 0 , null , $ dir );
108108 }
@@ -172,16 +172,16 @@ public function remove($files)
172172 if (is_link ($ file )) {
173173 // See https://bugs.php.net/52176
174174 if (!(self ::box ('unlink ' , $ file ) || '\\' !== \DIRECTORY_SEPARATOR || self ::box ('rmdir ' , $ file )) && file_exists ($ file )) {
175- throw new IOException (sprintf ('Failed to remove symlink "%s": %s. ' , $ file , self ::$ lastError ));
175+ throw new IOException (sprintf ('Failed to remove symlink "%s": ' . self ::$ lastError, $ file ));
176176 }
177177 } elseif (is_dir ($ file )) {
178178 $ this ->remove (new \FilesystemIterator ($ file , \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS ));
179179
180180 if (!self ::box ('rmdir ' , $ file ) && file_exists ($ file )) {
181- throw new IOException (sprintf ('Failed to remove directory "%s": %s. ' , $ file , self ::$ lastError ));
181+ throw new IOException (sprintf ('Failed to remove directory "%s": ' . self ::$ lastError, $ file ));
182182 }
183183 } elseif (!self ::box ('unlink ' , $ file ) && file_exists ($ file )) {
184- throw new IOException (sprintf ('Failed to remove file "%s": %s. ' , $ file , self ::$ lastError ));
184+ throw new IOException (sprintf ('Failed to remove file "%s": ' . self ::$ lastError, $ file ));
185185 }
186186 }
187187 }
0 commit comments