зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
8c12cfcc4a
Коммит
35e6989ef9
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче