mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-15 11:23:47 +09:00
Updates to vendors etc
This commit is contained in:
11
vendor/symfony/http-foundation/File/File.php
vendored
11
vendor/symfony/http-foundation/File/File.php
vendored
@@ -93,7 +93,7 @@ class File extends \SplFileInfo
|
||||
restore_error_handler();
|
||||
}
|
||||
if (!$renamed) {
|
||||
throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error)));
|
||||
throw new FileException(\sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error)));
|
||||
}
|
||||
|
||||
@chmod($target, 0666 & ~umask());
|
||||
@@ -106,7 +106,7 @@ class File extends \SplFileInfo
|
||||
$content = file_get_contents($this->getPathname());
|
||||
|
||||
if (false === $content) {
|
||||
throw new FileException(sprintf('Could not get the content of the file "%s".', $this->getPathname()));
|
||||
throw new FileException(\sprintf('Could not get the content of the file "%s".', $this->getPathname()));
|
||||
}
|
||||
|
||||
return $content;
|
||||
@@ -116,10 +116,10 @@ class File extends \SplFileInfo
|
||||
{
|
||||
if (!is_dir($directory)) {
|
||||
if (false === @mkdir($directory, 0777, true) && !is_dir($directory)) {
|
||||
throw new FileException(sprintf('Unable to create the "%s" directory.', $directory));
|
||||
throw new FileException(\sprintf('Unable to create the "%s" directory.', $directory));
|
||||
}
|
||||
} elseif (!is_writable($directory)) {
|
||||
throw new FileException(sprintf('Unable to write in the "%s" directory.', $directory));
|
||||
throw new FileException(\sprintf('Unable to write in the "%s" directory.', $directory));
|
||||
}
|
||||
|
||||
$target = rtrim($directory, '/\\').\DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name));
|
||||
@@ -134,8 +134,7 @@ class File extends \SplFileInfo
|
||||
{
|
||||
$originalName = str_replace('\\', '/', $name);
|
||||
$pos = strrpos($originalName, '/');
|
||||
$originalName = false === $pos ? $originalName : substr($originalName, $pos + 1);
|
||||
|
||||
return $originalName;
|
||||
return false === $pos ? $originalName : substr($originalName, $pos + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user