BUGFIX: Ticket #4220 - Copying of uploaded files from temp to assets folder fails on IIS installs; simple patch fixes it

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85696 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Julian Seidenberg 2009-09-03 22:45:15 +00:00
parent 5e3cffec1f
commit 844853ab10

View File

@ -192,10 +192,7 @@ class Folder extends File {
if($oldFile == $file && $i > 2) user_error("Couldn't fix $file with $i", E_USER_ERROR);
}
//$fullFilename = "$base/$file";
$fullFilename = $base . DIRECTORY_SEPARATOR . str_replace(array("\\","/") , DIRECTORY_SEPARATOR, $file );
if(file_exists($tmpFile['tmp_name']) && copy($tmpFile['tmp_name'], $fullFilename)) {
if (move_uploaded_file($tmpFile['tmp_name'], "$base/$file")) {
// Update with the new image
return $this->constructChild(basename($file));
} else {