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