Changeset 2376 in subversion for trunk/roundcubemail/program/steps/mail/attachments.inc
- Timestamp:
- Apr 6, 2009 7:33:13 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/steps/mail/attachments.inc
r2313 r2376 64 64 $temp_dir = unslashify($CONFIG['temp_dir']); 65 65 66 // #1484529: we need absolute path on Windows for move_uploaded_file() 67 if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { 68 $temp_dir = realpath($temp_dir); 69 } 70 66 71 if (!is_array($_SESSION['compose']['attachments'])) { 67 72 $_SESSION['compose']['attachments'] = array(); … … 74 79 foreach ($_FILES['_attachments']['tmp_name'] as $i => $filepath) { 75 80 $tmpfname = tempnam($temp_dir, 'rcmAttmnt'); 76 if (move_uploaded_file($filepath, $tmpfname) ) {81 if (move_uploaded_file($filepath, $tmpfname) && file_exists($tmpfname)) { 77 82 $id = count($_SESSION['compose']['attachments']); 78 83 $_SESSION['compose']['attachments'][] = array(
Note: See TracChangeset
for help on using the changeset viewer.
