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