From f2cf9dbfff5c340e0aef4a5928fb0100b0f4c17e Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Fri, 5 Mar 2021 14:50:07 +0100 Subject: [PATCH] Handle cache crash Not sure how this can happen. Fixes APP-YN --- lib/core/notes_cache.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/core/notes_cache.dart b/lib/core/notes_cache.dart index 35a17e55..f94699c3 100644 --- a/lib/core/notes_cache.dart +++ b/lib/core/notes_cache.dart @@ -39,6 +39,9 @@ class NotesCache { } for (var fullFilePath in fileList) { + if (!fullFilePath.startsWith(notesBasePath)) { + continue; + } var filePath = fullFilePath.substring(notesBasePath.length); var components = filePath.split(sep);