[HttpFoundation] Fixed the way path to directory is trimmed.
This commit is contained in:
parent
b591419631
commit
773e7161bf
@ -129,7 +129,7 @@ class File extends \SplFileInfo
|
|||||||
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 = trim($directory, '/\\').DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name));
|
$target = rtrim($directory, '/\\').DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name));
|
||||||
|
|
||||||
return new File($target, false);
|
return new File($target, false);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user