From a9a460c78872e4d2532b29c4762222ca051822fa Mon Sep 17 00:00:00 2001 From: Sharun <715417+sharunkumar@users.noreply.github.com> Date: Thu, 16 Mar 2023 19:26:14 -0400 Subject: [PATCH] feat: when exporting as markdown, have the current date in the file name --- src-tauri/src/scripts/export.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/scripts/export.js b/src-tauri/src/scripts/export.js index 4760901bf..b9cbaa63d 100644 --- a/src-tauri/src/scripts/export.js +++ b/src-tauri/src/scripts/export.js @@ -154,7 +154,7 @@ async function init() { }).join(''); const data = ExportMD.turndown(content); const { id, filename } = getName(); - await invoke('save_file', { name: `notes/${id}.md`, content: data }); + await invoke('save_file', { name: `notes/${new Date().toISOString().slice(0, 10)}-${id}.md`, content: data }); await invoke('download_list', { pathname: 'chat.notes.json', filename, id, dir: 'notes' }); }