rem: aData = aData.length ? aData[0] : aData; if (aData.flavour == "text/x-moz-url" || aData.flavour == "text/nsmessage") { aData = aData.data.data.toString();   var prettyName; var separator = aData.indexOf("\n"); if (separator != -1) { prettyName = aData.substr(separator+1); aData = aData.substr(0,separator); } if (!(DuplicateFileCheck(aData))) AddAttachment(aData, prettyName); else { dump("###ERROR ADDING DUPLICATE FILE \n"); var errorTitle = Bundle.GetStringFromName("DuplicateFileErrorDlogTitle"); var errorMsg = Bundle.GetStringFromName("DuplicateFileErrorDlogMessage"); 
add: var prettyName; var rawData = aData.data; switch (aData.flavour.contentType) { case "text/x-moz-url": case "text/nsmessage": var separator = rawData.indexOf("\n"); if (separator != -1) { prettyName = rawData.substr(separator+1); rawData = rawData.substr(0,separator); } break; case "application/x-moz-file": rawData = rawData.path; break; } if (!(DuplicateFileCheck(rawData))) AddAttachment(rawData, prettyName); else { var errorTitle = Bundle.GetStringFromName("DuplicateFileErrorDlogTitle"); var errorMsg = Bundle.GetStringFromName("DuplicateFileErrorDlogMessage"); 
context:   onDrop: function (aEvent, aData, aDragSession)    {      aData = aData.length ? aData[0] : aData;      if (aData.flavour == "text/x-moz-url" || aData.flavour == "text/nsmessage") {          aData = aData.data.data.toString();          // pull out the URL / title                    var prettyName;          var separator = aData.indexOf("\n");          if (separator != -1) {              prettyName = aData.substr(separator+1);              aData = aData.substr(0,separator);          }          if (!(DuplicateFileCheck(aData)))	          AddAttachment(aData, prettyName);          else           {            dump("###ERROR ADDING DUPLICATE FILE \n");            var errorTitle = Bundle.GetStringFromName("DuplicateFileErrorDlogTitle");            var errorMsg = Bundle.GetStringFromName("DuplicateFileErrorDlogMessage");            if (commonDialogsService)              commonDialogsService.Alert(window, errorTitle, errorMsg);            else              window.alert(errorMsg);          }                }    },
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/cdbe3e76b5357e682728b2864cafdaf3e593c5aa/MsgComposeCommands.js/buggy/mailnews/compose/resources/content/MsgComposeCommands.js