[HttpFoundation] Fixed the way path to directory is trimmed.

This commit is contained in:
Jakub Zalas 2013-09-12 23:34:38 +01:00
parent b591419631
commit 773e7161bf
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 = 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);
}