rem: line = "cd \"" + location.path + "\"\n"; 
add: line = "cd /d \"" + location.path + "\"\n"; 
context: function CCKZip(zipfile, location){  var file = location.clone();  file.append(zipfile);  try {    file.remove(false);  } catch (ex) {}  if (Components.interfaces.IZipWriterComponent) {    var archivefileobj = location.clone();    archivefileobj.append(zipfile);      try {      var zipwriterobj = Components.classes["@ottley.org/libzip/zip-writer;1"]                                   .createInstance(Components.interfaces.IZipWriterComponent);                                      zipwriterobj.CURR_COMPRESS_LEVEL = Components.interfaces.IZipWriterComponent.COMPRESS_LEVEL9;              var sourcepathobj = Components.classes["@mozilla.org/file/local;1"]                                    .createInstance(Components.interfaces.nsILocalFile);      sourcepathobj.initWithPath(location.path);        zipwriterobj.init(archivefileobj);            zipwriterobj.basepath = sourcepathobj;            var zipentriestoadd = new Array();            for (var i=2; i < arguments.length; i++) {        var sourcepathobj = location.clone();        sourcepathobj.append(arguments[i]);        if (sourcepathobj.exists() && sourcepathobj.isDirectory()) {          var entries = sourcepathobj.directoryEntries;            while (entries.hasMoreElements()) {            zipentriestoadd.push(entries.getNext());          }        } else if (sourcepathobj.exists()) {            zipentriestoadd.push(sourcepathobj);        }      }            // Add files depth first      while (zipentriestoadd.length > 0) {        var zipentry = zipentriestoadd.pop();                zipentry.QueryInterface(Components.interfaces.nsILocalFile);               if (!zipentry.isDirectory()) {          zipwriterobj.add(zipentry);        }                if (zipentry.exists() && zipentry.isDirectory()) {          var entries = zipentry.directoryEntries;            while (entries.hasMoreElements()) {            zipentriestoadd.push(entries.getNext());          }        }              }        zipwriterobj.commitUpdates();          } catch (e) {      gPromptService.alert(window, "", "ZIPWriterComponent error");    }    return;  }    var zipLocation = document.getElementById("zipLocation").value;  if (zipLocation.length == 0) {    zipLocation = "zip";  }  platform = navigator.platform;  var file = location.clone();               if (navigator.platform == "Win32")    file.append("ccktemp.cmd");  else    file.append("ccktemp.sh");    var fos = Components.classes["@mozilla.org/network/file-output-stream;1"]                       .createInstance(Components.interfaces.nsIFileOutputStream);  fos.init(file, -1, -1, false);  var line;  line = "cd \"" + location.path + "\"\n";  fos.write(line, line.length);  if (navigator.platform == "Win32")    line = zipLocation + " -r \"" + location.path + "\\" + zipfile + "\"";  else    line = zipLocation + " -r \"" + location.path + "/" + zipfile + "\"";    for (var i=2; i < arguments.length; i++) {    line += " " + arguments[i];  }  line += "\n";  fos.write(line, line.length);    fos.close();  var sh;  // create an nsILocalFile for the executable  if (navigator.platform != "Win32") {    sh = Components.classes["@mozilla.org/file/local;1"]                   .createInstance(Components.interfaces.nsILocalFile);    sh.initWithPath("/bin/sh");  }  // create an nsIProcess  var process = Components.classes["@mozilla.org/process/util;1"]                          .createInstance(Components.interfaces.nsIProcess);                            if (navigator.platform == "Win32")    process.init(file);  else    process.init(sh);  var args = [file.path];    process.run(true, args, args.length);//  file.remove(false);}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/a754054802bad5b1a8a3244dff628c02ab19309d/cckwizard.js/buggy/extensions/cck/browser/resources/content/cckwizard/cckwizard.js