Ignore:
Timestamp:
Jan 13, 2024 8:56:57 PM (4 months ago)
Author:
anonymous
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Upload.inc.php

    r724 r806  
    361361
    362362        if (!is_file($file_path_name)) {
    363             $app->logMsg(sprintf('Error deleting nonexistent file: %s', $file_path_name), LOG_ERR, __FILE__, __LINE__);
     363            $app->logMsg(sprintf('Error deleting; not a file: %s', $file_path_name), LOG_ERR, __FILE__, __LINE__);
    364364            return false;
    365365        } else if (unlink($file_path_name)) {
     
    393393        $old_file_path_name = $this->getParam('upload_path') . '/' . $old_name;
    394394        $new_file_path_name = $this->getParam('upload_path') . '/' . $new_name;
    395         if (file_exists($old_file_path_name)) {
     395        if (file_exists($old_file_path_name) && is_file($old_file_path_name)) {
    396396            if (rename($old_file_path_name, $new_file_path_name)) {
    397397                $this->_raiseMsg(sprintf(_("The file %s has been renamed to %s."), basename($old_file_path_name), basename($new_file_path_name)), MSG_NOTICE, __FILE__, __LINE__);
Note: See TracChangeset for help on using the changeset viewer.