diff --git a/lib/core/note_fileName.dart b/lib/core/note_fileName.dart index 199a5fec..66601459 100644 --- a/lib/core/note_fileName.dart +++ b/lib/core/note_fileName.dart @@ -30,6 +30,9 @@ String getFileName(Note note) { } String buildTitleFileName(String parentDir, String title) { + // Sanitize the title - these characters are not allowed in Windows + title = title.replaceAll(RegExp(r'[/<\>":|?*]'), '_'); + var fileName = title + ".md"; var fullPath = p.join(parentDir, fileName); var file = File(fullPath);