Bug 346994: part 1, remove leading dots from filenames before saving, r=mano

git-svn-id: svn://10.0.0.236/trunk@224639 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com
2007-04-17 18:51:34 +00:00
parent 9d746555af
commit a6f56f117f
2 changed files with 8 additions and 0 deletions

View File

@@ -830,6 +830,9 @@ function getNormalizedLeafName(aFile, aDefaultExtension)
// Remove trailing dots and spaces on windows
aFile = aFile.replace(/[\s.]+$/, "");
#endif
// Remove leading dots
aFile = aFile.replace(/^\.+/, "");
// Fix up the file name we're saving to to include the default extension
var i = aFile.lastIndexOf(".");