Bug 160454 - "Eliminate use of HEAD in "save as"" ((AAv1) cleanup |getFileBaseName()| usages) [p=sgautherie.bz@free.fr (Serge Gautherie) r=Mano sr=Neil a1.9=beltzner]

git-svn-id: svn://10.0.0.236/trunk@241631 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com 2007-12-18 05:48:09 +00:00
parent d25ab27d7b
commit 4578a4b374
2 changed files with 6 additions and 6 deletions

View File

@ -396,7 +396,7 @@ function internalSave(aURL, aDocument, aDefaultFileName, aContentDisposition,
// Create the local directory into which to save associated files.
filesFolder = file.clone();
var nameWithoutExtension = filesFolder.leafName.replace(/\.[^.]*$/, "");
var nameWithoutExtension = getFileBaseName(filesFolder.leafName);
var filesFolderLeafName = getStringBundle().formatStringFromName("filesFolder",
[nameWithoutExtension],
1);
@ -500,7 +500,7 @@ function initFileInfo(aFI, aURL, aURLCharset, aDocument,
aFI.fileBaseName = aFI.fileName;
} else {
aFI.fileExt = getDefaultExtension(aFI.fileName, aFI.uri, aContentType);
aFI.fileBaseName = getFileBaseName(aFI.fileName, aFI.fileExt);
aFI.fileBaseName = getFileBaseName(aFI.fileName);
}
} catch (e) {
}
@ -759,7 +759,7 @@ function getMIMEService()
}
// Given aFileName, find the fileName without the extension on the end.
function getFileBaseName(aFileName, aFileExt)
function getFileBaseName(aFileName)
{
// Remove the file extension from aFileName:
return aFileName.replace(/\.[^.]*$/, "");

View File

@ -337,7 +337,7 @@ function internalSave(aURL, aDocument, aDefaultFileName, aContentDisposition,
// Create the local directory into which to save associated files.
filesFolder = file.clone();
var nameWithoutExtension = filesFolder.leafName.replace(/\.[^.]*$/, "");
var nameWithoutExtension = getFileBaseName(filesFolder.leafName);
var filesFolderLeafName = getStringBundle().formatStringFromName("filesFolder",
[nameWithoutExtension],
1);
@ -441,7 +441,7 @@ function initFileInfo(aFI, aURL, aURLCharset, aDocument,
aFI.fileBaseName = aFI.fileName;
} else {
aFI.fileExt = getDefaultExtension(aFI.fileName, aFI.uri, aContentType);
aFI.fileBaseName = getFileBaseName(aFI.fileName, aFI.fileExt);
aFI.fileBaseName = getFileBaseName(aFI.fileName);
}
} catch (e) {
}
@ -710,7 +710,7 @@ function getMIMEService()
}
// Given aFileName, find the fileName without the extension on the end.
function getFileBaseName(aFileName, aFileExt)
function getFileBaseName(aFileName)
{
// Remove the file extension from aFileName:
return aFileName.replace(/\.[^.]*$/, "");