From db37bfbf81e646db51f1ace2b166e2f177ad1e63 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Thu, 14 May 2020 16:58:16 +0200 Subject: [PATCH] Note: Not all files end with a '.md' This was only supposed to be done for new files --- lib/core/note.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/core/note.dart b/lib/core/note.dart index d40680f1..82ff929c 100644 --- a/lib/core/note.dart +++ b/lib/core/note.dart @@ -58,10 +58,13 @@ class Note with NotesNotifier { } String get filePath { - _filePath ??= p.join(parent.folderPath, getFileName(this)); - if (!_filePath.toLowerCase().endsWith('.md')) { - _filePath += '.md'; + if (_filePath == null) { + _filePath = p.join(parent.folderPath, getFileName(this)); + if (!_filePath.toLowerCase().endsWith('.md')) { + _filePath += '.md'; + } } + return _filePath; }