Skip to content

Commit b3ee7d5

Browse files
committed
Merge branch '5.0'
* 5.0: Tweak the code to avoid fabbot false positives Remove UPGRADE files for 4.x
2 parents 682216b + 7cd0daf commit b3ee7d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Filesystem.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function mkdir($dirs, int $mode = 0777)
9797
if (!is_dir($dir)) {
9898
// The directory was not created by a concurrent process. Let's throw an exception with a developer friendly error message if we have one
9999
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);
101101
}
102102
throw new IOException(sprintf('Failed to create "%s".', $dir), 0, null, $dir);
103103
}
@@ -167,16 +167,16 @@ public function remove($files)
167167
if (is_link($file)) {
168168
// See https://bugs.php.net/52176
169169
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));
171171
}
172172
} elseif (is_dir($file)) {
173173
$this->remove(new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS));
174174

175175
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));
177177
}
178178
} 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));
180180
}
181181
}
182182
}

0 commit comments

Comments
 (0)