[HttpFoundation] removed double-slashes (closes #8388)

This commit is contained in:
Fabien Potencier 2013-09-12 20:46:44 +02:00
parent 7b93e20e37
commit b591419631
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ class File extends \SplFileInfo
throw new FileException(sprintf('Unable to write in the "%s" directory', $directory));
}
$target = $directory.DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name));
$target = trim($directory, '/\\').DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name));
return new File($target, false);
}