Changeset 806 for trunk/lib/Upload.inc.php
- Timestamp:
- Jan 13, 2024 8:56:57 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Upload.inc.php
r724 r806 361 361 362 362 if (!is_file($file_path_name)) { 363 $app->logMsg(sprintf('Error deleting nonexistentfile: %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__); 364 364 return false; 365 365 } else if (unlink($file_path_name)) { … … 393 393 $old_file_path_name = $this->getParam('upload_path') . '/' . $old_name; 394 394 $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)) { 396 396 if (rename($old_file_path_name, $new_file_path_name)) { 397 397 $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.