Make WordPress Core

Changeset 435


Ignore:
Timestamp:
10/08/2003 05:41:54 PM (22 years ago)
Author:
emc3
Message:

Added unlink() call to clean up any possible temporary files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/b2upload.php

    r434 r435  
    172172            $moved = copy($img1, $pathtofile2);
    173173        }
    174         if (!$moved)
     174        if (!$moved) {
    175175            die("Couldn't Upload Your File to $pathtofile2.");
     176        } else {
     177            @unlink($img1);
     178        }
    176179   
    177180    // duplicate-renaming function contributed by Gary Lawrence Murphy
     
    209212        }
    210213        // Still couldn't get it. Give up.
    211         if (!moved)
     214        if (!moved) {
    212215            die("Couldn't Upload Your File to $pathtofile.");
     216        } else {
     217            @unlink($img1);
     218        }
    213219    } else {
    214220        rename($img1, $pathtofile)
Note: See TracChangeset for help on using the changeset viewer.