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