Bug 1395252 - Bug 1341211 follow-up: Use nsIFilePicker.files when using nsIFilePicker.modeOpenMultiple. r=aceman DONTBUILD
authorJorg K <jorgk@jorgk.com>
Wed, 30 Aug 2017 23:47:22 +0200
changeset 29647 a8c9aa8f996c588571185a8b92766365b751208d
parent 29646 e9d97ccc329beb071f429039999d412343f13344
child 29648 46717004e108ce5d7d36e63764343a0b8a77510f
push id378
push userclokep@gmail.com
push dateMon, 13 Nov 2017 18:45:35 +0000
reviewersaceman
bugs1395252, 1341211
Bug 1395252 - Bug 1341211 follow-up: Use nsIFilePicker.files when using nsIFilePicker.modeOpenMultiple. r=aceman DONTBUILD
mail/components/compose/content/MsgComposeCommands.js
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -4072,19 +4072,19 @@ function AttachFile()
           nsIFilePicker.modeOpenMultiple);
 
   var lastDirectory = GetLastAttachDirectory();
   if (lastDirectory)
     fp.displayDirectory = lastDirectory;
 
   fp.appendFilters(nsIFilePicker.filterAll);
   fp.open(rv => {
-    if (rv != Components.interfaces.nsIFilePicker.returnOK || !fp.file) {
+    if (rv != Components.interfaces.nsIFilePicker.returnOK || !fp.files)
       return;
-    }
+
     let file;
     let attachments = [];
 
     for (file of fixIterator(fp.files, Components.interfaces.nsIFile))
       attachments.push(FileToAttachment(file));
 
     AddAttachments(attachments);
     SetLastAttachDirectory(file);