diff --git a/src/main/menu/actions/file.js b/src/main/menu/actions/file.js index 96e35ab8..ff44b711 100644 --- a/src/main/menu/actions/file.js +++ b/src/main/menu/actions/file.js @@ -133,6 +133,8 @@ const handleResponseForSave = async (e, { id, filename, markdown, pathname, opti } filePath = path.resolve(filePath) + const extension = path.extname(filePath) || '.md' + filePath = !filePath.endsWith(extension) ? filePath += extension : filePath return writeMarkdownFile(filePath, markdown, options, win) .then(() => { if (!alreadyExistOnDisk) {