Index: /trunk/roundcubemail/CHANGELOG
===================================================================
--- /trunk/roundcubemail/CHANGELOG	(revision 2375)
+++ /trunk/roundcubemail/CHANGELOG	(revision 2376)
@@ -2,4 +2,5 @@
 ===========================
 
+- Fix 'temp_dir' does not support relative path under Windows (#1484529)
 - Fix "Initialize Database" button missing from installer (#1485802)
 - Fix compose window doesn't fit 1024x768 window (#1485396)
Index: /trunk/roundcubemail/program/steps/mail/attachments.inc
===================================================================
--- /trunk/roundcubemail/program/steps/mail/attachments.inc	(revision 2375)
+++ /trunk/roundcubemail/program/steps/mail/attachments.inc	(revision 2376)
@@ -64,4 +64,9 @@
 $temp_dir = unslashify($CONFIG['temp_dir']);
 
+// #1484529: we need absolute path on Windows for move_uploaded_file()
+if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+  $temp_dir = realpath($temp_dir);
+}
+
 if (!is_array($_SESSION['compose']['attachments'])) {
   $_SESSION['compose']['attachments'] = array();
@@ -74,5 +79,5 @@
   foreach ($_FILES['_attachments']['tmp_name'] as $i => $filepath) {
     $tmpfname = tempnam($temp_dir, 'rcmAttmnt');
-    if (move_uploaded_file($filepath, $tmpfname)) {
+    if (move_uploaded_file($filepath, $tmpfname) && file_exists($tmpfname)) {
       $id = count($_SESSION['compose']['attachments']);
       $_SESSION['compose']['attachments'][] = array(
