summaryrefslogtreecommitdiffstats
path: root/mailnews/local
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
commitb797607a8fcdbdc8e9690e871a86aeed5f6517bd (patch)
tree0b429ca2667392b595600b9051dd4f8ba3f2f0ed /mailnews/local
parent717be395fda0a4fb9d83afb772a45c5f5fdb5271 (diff)
downloadUXP-b797607a8fcdbdc8e9690e871a86aeed5f6517bd.tar
UXP-b797607a8fcdbdc8e9690e871a86aeed5f6517bd.tar.gz
UXP-b797607a8fcdbdc8e9690e871a86aeed5f6517bd.tar.lz
UXP-b797607a8fcdbdc8e9690e871a86aeed5f6517bd.tar.xz
UXP-b797607a8fcdbdc8e9690e871a86aeed5f6517bd.zip
Bug 1482248 - don't crash on empty file name in nsMsgLocalStoreUtils::nsShouldIgnoreFile.
Tag #1311
Diffstat (limited to 'mailnews/local')
-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) == '~')