зеркало из https://github.com/mozilla/pjs.git
Bug 305314, Save as plain text sometimes fails to use correct extension. Append correct extension. Patch by Nick Kreeger <nick.kreeger@gmail.com>. Camino-only. r=pinkerton
This commit is contained in:
Родитель
78e96ecd3e
Коммит
ad1a27aac7
|
@ -325,8 +325,12 @@ nsresult nsHeaderSniffer::PerformSave(nsIURI* inOriginalURI)
|
||||||
// need this because the |stringWith_nsAString| returns a NSString
|
// need this because the |stringWith_nsAString| returns a NSString
|
||||||
// with an extension that the savePanel does not like and will add
|
// with an extension that the savePanel does not like and will add
|
||||||
// the extensions on top of an extensions
|
// the extensions on top of an extensions
|
||||||
|
if (filterIndex == eSaveFormatPlainText) {
|
||||||
|
file = [file stringByDeletingPathExtension];
|
||||||
|
file = [file stringByAppendingPathExtension:@"txt"];
|
||||||
|
}
|
||||||
NSLog([file pathExtension]);
|
NSLog([file pathExtension]);
|
||||||
[savePanel setRequiredFileType: [file pathExtension]];
|
[savePanel setRequiredFileType:[file pathExtension]];
|
||||||
[savePanel setCanSelectHiddenExtension: YES];
|
[savePanel setCanSelectHiddenExtension: YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче