From b797607a8fcdbdc8e9690e871a86aeed5f6517bd Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Mon, 2 Dec 2019 22:14:49 -0500 Subject: Bug 1482248 - don't crash on empty file name in nsMsgLocalStoreUtils::nsShouldIgnoreFile. Tag #1311 --- mailnews/local/src/nsMsgLocalStoreUtils.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mailnews') 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) == '~') -- cgit v1.2.3