mirror of
git://develop.git.wordpress.org/
synced 2025-02-24 00:24:52 +01:00
Added unlink() call to clean up any possible temporary files.
git-svn-id: https://develop.svn.wordpress.org/trunk@435 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
63a2e6d5a1
commit
ad420fecc5
@ -171,8 +171,11 @@ if (!empty($HTTP_POST_VARS)) { //$img1_name != "") {
|
||||
if (!$moved) {
|
||||
$moved = copy($img1, $pathtofile2);
|
||||
}
|
||||
if (!$moved)
|
||||
if (!$moved) {
|
||||
die("Couldn't Upload Your File to $pathtofile2.");
|
||||
} else {
|
||||
@unlink($img1);
|
||||
}
|
||||
|
||||
// duplicate-renaming function contributed by Gary Lawrence Murphy
|
||||
?>
|
||||
@ -208,8 +211,11 @@ if (!empty($HTTP_POST_VARS)) { //$img1_name != "") {
|
||||
$moved = copy($img1, $pathtofile);
|
||||
}
|
||||
// Still couldn't get it. Give up.
|
||||
if (!moved)
|
||||
if (!moved) {
|
||||
die("Couldn't Upload Your File to $pathtofile.");
|
||||
} else {
|
||||
@unlink($img1);
|
||||
}
|
||||
} else {
|
||||
rename($img1, $pathtofile)
|
||||
or die("Couldn't Upload Your File to $pathtofile.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user