@@ -102,7 +102,7 @@ public function mkdir($dirs, $mode = 0777)
102
102
if (!is_dir ($ dir )) {
103
103
// The directory was not created by a concurrent process. Let's throw an exception with a developer friendly error message if we have one
104
104
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 );
106
106
}
107
107
throw new IOException (sprintf ('Failed to create "%s". ' , $ dir ), 0 , null , $ dir );
108
108
}
@@ -172,16 +172,16 @@ public function remove($files)
172
172
if (is_link ($ file )) {
173
173
// See https://bugs.php.net/52176
174
174
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 ));
176
176
}
177
177
} elseif (is_dir ($ file )) {
178
178
$ this ->remove (new \FilesystemIterator ($ file , \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS ));
179
179
180
180
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 ));
182
182
}
183
183
} 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 ));
185
185
}
186
186
}
187
187
}
0 commit comments