r=pete, sr=bzbarsky, a=asa
Fix regression printing on OS/2 - don't do localfile stuff unless we are printing to file
This commit is contained in:
mkaply%us.ibm.com 2002-07-30 19:27:05 +00:00
Родитель 36b876dea9
Коммит 837c27aeee
1 изменённых файлов: 13 добавлений и 10 удалений

Просмотреть файл

@ -398,17 +398,20 @@ function onAccept()
gPrintSettings.toFileName = dialog.fileInput.value;
gPrintSettings.printerName = dialog.printerList.value;
var sfile = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
sfile.initWithPath(gPrintSettings.toFileName);
if (sfile.exists() &&
gPrintSettings.printToFile &&
gPrintSettings.toFileName != gFileFromPicker) {
var desc = stringBundle.formatStringFromName("fileConfirm.exists",
[gPrintSettings.toFileName],
1);
if (!promptService.confirm(this.window, null, desc)) {
if (gPrintSettings.printToFile) {
if (gPrintSettings.toFileName == "")
return false;
var sfile = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
sfile.initWithPath(gPrintSettings.toFileName);
if (sfile.exists() &&
gPrintSettings.toFileName != gFileFromPicker) {
var desc = stringBundle.formatStringFromName("fileConfirm.exists",
[gPrintSettings.toFileName],
1);
if (!promptService.confirm(this.window, null, desc)) {
return false;
}
}
}