summaryrefslogtreecommitdiff
path: root/mailnews
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-12-02 22:14:49 -0500
committerGaming4JC <g4jc@hyperbola.info>2019-12-02 23:50:22 -0500
commita6afe54fa6e3d857104404b94a7c6557271847d0 (patch)
tree0b429ca2667392b595600b9051dd4f8ba3f2f0ed /mailnews
parentafdbdcf701279601bc31ee76a27a648eecaed381 (diff)
downloadaura-central-a6afe54fa6e3d857104404b94a7c6557271847d0.tar.gz
Bug 1482248 - don't crash on empty file name in nsMsgLocalStoreUtils::nsShouldIgnoreFile.
Tag mcp-graveyard/UXP%1311
Diffstat (limited to 'mailnews')
-rw-r--r--mailnews/local/src/nsMsgLocalStoreUtils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/mailnews/local/src/nsMsgLocalStoreUtils.cpp b/mailnews/local/src/nsMsgLocalStoreUtils.cpp
index 17d9b0f29..642694d3b 100644
--- a/mailnews/local/src/nsMsgLocalStoreUtils.cpp
+++ b/mailnews/local/src/nsMsgLocalStoreUtils.cpp
@@ -28,6 +28,9 @@ nsMsgLocalStoreUtils::AddDirectorySeparator(nsIFile *path)
bool
nsMsgLocalStoreUtils::nsShouldIgnoreFile(nsAString& name)
{
+ if (name.IsEmpty())
+ return true;
+
char16_t firstChar = name.First();
if (firstChar == '.' || firstChar == '#' ||
name.CharAt(name.Length() - 1) == '~')