From b591419631ec7de8db7a4b3970bfdab5b1f82d4a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 12 Sep 2013 20:46:44 +0200 Subject: [PATCH] [HttpFoundation] removed double-slashes (closes #8388) --- src/Symfony/Component/HttpFoundation/File/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/File/File.php b/src/Symfony/Component/HttpFoundation/File/File.php index 729d870cfc..c8967b1bf7 100644 --- a/src/Symfony/Component/HttpFoundation/File/File.php +++ b/src/Symfony/Component/HttpFoundation/File/File.php @@ -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); }