Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 265299
Collapse All | Expand All

(-)MsgComposeCommands.js.orig (-1 / +14 lines)
Lines 1253-1262 Link Here
1253
      {
1253
      {
1254
        var attachmentList = args.attachment.split(",");
1254
        var attachmentList = args.attachment.split(",");
1255
        var attachment;
1255
        var attachment;
1256
        var localFile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
1257
        var ioService = Components.classes["@mozilla.org/network/io-service;1"]
1258
        ioService = ioService.getService(Components.interfaces.nsIIOService);
1259
        var fileHandler = ioService.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);
1256
        for (var i = 0; i < attachmentList.length; i ++)
1260
        for (var i = 0; i < attachmentList.length; i ++)
1257
        {
1261
        {
1262
          var attachmentStr = attachmentList[i];
1258
          attachment = Components.classes["@mozilla.org/messengercompose/attachment;1"].createInstance(Components.interfaces.nsIMsgAttachment);
1263
          attachment = Components.classes["@mozilla.org/messengercompose/attachment;1"].createInstance(Components.interfaces.nsIMsgAttachment);
1259
          attachment.url = attachmentList[i];
1264
          if (attachmentStr.substr(0, 7) == "file://")
1265
          {
1266
            attachment.url = attachmentStr;
1267
          }
1268
          else
1269
          {
1270
            localFile.initWithPath(attachmentList[i]);
1271
            attachment.url = fileHandler.getURLSpecFromFile(localFile);;
1272
          }
1260
          composeFields.addAttachment(attachment);
1273
          composeFields.addAttachment(attachment);
1261
        }
1274
        }
1262
      }
1275
      }

Return to bug 265299