rem: url = kLF.URL; 
add: if (kLF.exists()) url = kLF.URL; 
context: function onOK(){  // In Select Folder Mode, do nothing but tell our caller what  // folder was selected.   if (window.arguments[4] == "selectFolder")    window.arguments[5].selectedFolder = gCreateInFolder;  else {    // Otherwise add a bookmark to the selected folder.     const kBMDS = kRDF.GetDataSource("rdf:bookmarks");    const kBMSContractID = "@mozilla.org/browser/bookmarks-service;1";    const kBMSIID = Components.interfaces.nsIBookmarksService;    const kBMS = Components.classes[kBMSContractID].getService(kBMSIID);    var rFolder = kRDF.GetResource(gCreateInFolder, true);    const kRDFCContractID = "@mozilla.org/rdf/container;1";    const kRDFIID = Components.interfaces.nsIRDFContainer;    const kRDFC = Components.classes[kRDFCContractID].getService(kRDFIID);    try {      kRDFC.Init(kBMDS, rFolder);    }    catch (e) {      // No "NC:NewBookmarkFolder" exists, just append to the root.      rFolder = kRDF.GetResource("NC:BookmarksRoot", true);      kRDFC.Init(kBMDS, rFolder);    }    if (!gFld_URL.value) return;        // Check to see if the item is a local directory path, and if so, convert    // to a file URL so that aggregation with rdf:files works    var url = gFld_URL.value;    try {      const kLFContractID = "@mozilla.org/file/local;1";      const kLFIID = Components.interfaces.nsILocalFile;      const kLF = Components.classes[kLFContractID].createInstance(kLFIID);      kLF.initWithUnicodePath(url);      url = kLF.URL;    }    catch (e) {    }        kBMS.AddBookmarkToFolder(url, rFolder, gFld_Name.value, gBookmarkCharset);  }  close();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/56d94d9e9673746220b6ed1cccaa93f341e29710/addBookmark.js/buggy/xpfe/components/bookmarks/resources/addBookmark.js