forked from mirrors/gecko-dev
Bug 1809923, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D167953
This commit is contained in:
parent
fea63a2dbb
commit
bea47874ab
1 changed files with 6 additions and 3 deletions
|
|
@ -3442,11 +3442,14 @@ nsExternalHelperAppService::ValidateFileNameForSaving(
|
|||
nsLocalFile::CheckForReservedFileName(fileName);
|
||||
#endif
|
||||
|
||||
// If the extension is .lnk or .local, replace it with .download, as these
|
||||
// If the extension is one these types, replace it with .download, as these
|
||||
// types of files can have signifance on Windows. This happens for any file,
|
||||
// not just those with the shortcut mime type.
|
||||
if (StringEndsWith(fileName, u".lnk"_ns) ||
|
||||
StringEndsWith(fileName, u".local"_ns)) {
|
||||
if (StringEndsWith(fileName, u".lnk"_ns, nsCaseInsensitiveStringComparator) ||
|
||||
StringEndsWith(fileName, u".local"_ns,
|
||||
nsCaseInsensitiveStringComparator) ||
|
||||
StringEndsWith(fileName, u".url"_ns, nsCaseInsensitiveStringComparator) ||
|
||||
StringEndsWith(fileName, u".scf"_ns, nsCaseInsensitiveStringComparator)) {
|
||||
fileName.AppendLiteral(".download");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue