Bug 412822 nsIFilePicker makes it hard to drop in other url systems r=neil a=dsicore
authortimeless@mozdev.org
Tue, 26 Feb 2008 09:19:21 -0800
changeset 12268 624cbd0e90bef8366beb822cf38f60cc6a6ed243
parent 12267 e8357d7b2f21f0ab4af3f04f1adbaf0a27d8fd80
child 12269 87661fe84265c75a834538f67e61a2732e50c95a
push idunknown
push userunknown
push dateunknown
reviewersneil, dsicore
bugs412822
milestone1.9b4pre
Bug 412822 nsIFilePicker makes it hard to drop in other url systems r=neil a=dsicore
toolkit/components/filepicker/content/filepicker.js
--- a/toolkit/components/filepicker/content/filepicker.js
+++ b/toolkit/components/filepicker/content/filepicker.js
@@ -239,20 +239,20 @@ function selectOnOK()
   var isFile = false;
 
   retvals.filterIndex = document.getElementById("filterMenuList");
   retvals.fileURL = null;
 
   if (allowURLs) {
     try {
       var ios = Components.classes[NS_IOSERVICE_CONTRACTID].getService(Components.interfaces.nsIIOService);
-      retvals.fileURL = ios.newURI(textInput.value, '', null);
+      retvals.fileURL = ios.newURI(textInput.value, null, null);
       var fileList = [];
       if (retvals.fileURL instanceof Components.interfaces.nsIFileURL)
-        fileList.push(retvals.fileURL.nsIFileURL.file);
+        fileList.push(retvals.fileURL.file);
       gFilesEnumerator.mFiles = fileList;
       retvals.files = gFilesEnumerator;
       retvals.buttonStatus = ret;
 
       return true;
     } catch (e) {
     }
   }