rem: filesFolder.initWithUnicodePath(persistArgs.target.unicodePath); 
add: filesFolder.initWithPath(persistArgs.target.path); 
context: function onLoad() {    // Set global variables.    try {      helperAppLoader = window.arguments[0].QueryInterface( Components.interfaces.nsIHelperAppLauncher );    }    catch (e) {      webBrowserPersist = window.arguments[0].QueryInterface( Components.interfaces.nsIWebBrowserPersist );    }     if ( !helperAppLoader && !webBrowserPersist ) {        dump( "Invalid argument to helperAppDldProgress.xul\n" );        window.close()        return;    }    dialog = new Object;    dialog.strings = new Array;    dialog.location    = document.getElementById("dialog.location");    dialog.contentType = document.getElementById("dialog.contentType");    dialog.fileName    = document.getElementById("dialog.fileName");    dialog.status      = document.getElementById("dialog.status");    dialog.progress    = document.getElementById("dialog.progress");    dialog.progressText = document.getElementById("dialog.progressText");    dialog.timeLeft    = document.getElementById("dialog.timeLeft");    dialog.timeElapsed = document.getElementById("dialog.timeElapsed");    dialog.cancel      = document.getElementById("cancel");    dialog.pause       = document.getElementById("pause");    dialog.resume      = document.getElementById("resume");    dialog.pauseResumeDeck = document.getElementById("pauseResumeDeck");    dialog.request     = 0;    dialog.downloadPaused = false;    keepProgressWindowUpBox = document.getElementById('keepProgressDialogUp');    // Set up dialog button callbacks.    var object = this;    doSetOKCancel("", function () { return object.onCancel();});    // set our web progress listener on the helper app launcher    if (helperAppLoader)       helperAppLoader.setWebProgressListener(progressListener);    else if (webBrowserPersist) {      webBrowserPersist.progressListener = progressListener;            persistArgs = window.arguments[1];            targetFile = persistArgs.target;              try {        var uri = persistArgs.source.QueryInterface(Components.interfaces.nsIURI);        webBrowserPersist.saveURI(uri, persistArgs.postData, targetFile);      }      catch (e) {        // Saving a Document, not a URI:                // Create the local directory into which to save associated files.         const lfContractID = "@mozilla.org/file/local;1";        const lfIID = Components.interfaces.nsILocalFile;        var filesFolder = Components .classes[lfContractID].createInstance(lfIID);        filesFolder.initWithUnicodePath(persistArgs.target.unicodePath);                var nameWithoutExtension = filesFolder.leafName;        nameWithoutExtension = nameWithoutExtension.substring(0, nameWithoutExtension.lastIndexOf("."));        var filesFolderLeafName = getString("filesFolder");        filesFolderLeafName = filesFolderLeafName.replace(/\^BASE\^/, nameWithoutExtension);        filesFolder.leafName = filesFolderLeafName;                filesFolder.create(lfIID.DIRECTORY_TYPE, 0644);        webBrowserPersist.saveDocument(persistArgs.source, targetFile, filesFolder, null, 0, 0);      }    }        // Fill dialog.    loadDialog();    if ( window.opener ) {        moveToAlertPosition();    } else {        centerWindowOnScreen();    }        // Set initial focus    if ( !completed )    {        keepProgressWindowUpBox.focus();    }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/e554d8362610c90f4ebe2db02722d04eb1194011/helperAppDldProgress.js/clean/xpfe/components/ucth/resources/helperAppDldProgress.js