![]() ![]() What we usually do: renaming the current note and then overwriting it. If a note needs to be renamed to something else (because it has been editedĪnd it's title changed), and that something else is already present onĭisk, we delete the current note and overwrite the other one instead of If you tell the app to permanently delete a note we delete it from the disk. Multiple notes got deleted accidentally: we are only deleting notes inĢ places (you can check this yourself by searching the codebase for The title if it begins with "Untitled" □ ![]() Want to make this check more strict, ensuring that we are only selecting The note whose title got selected for you had no content? I suppose we may Generally want to change its title right away, so we preselect it. The idea behind this is that perhaps youĬreated a new note, whose initial content might be "# Untitled" and you'd Works currently is that a note's title will be selected automatically when Multiple notes get deleted accidentallyĪ note's title is being selected when it shouldn't be: the way it You press enter and the note's title gets removedĩ. You switch to edit mode (I suppose, otherwise you wouldn't be ableĨ. You click a link in that note that points to another noteĦ. You're in preview mode (I suppose, otherwise you couldn't click aĤ. On Tue, at 5:02 AM Fabio Spampinato wrote:ģ. If you can reproduce this issue reliably, can you check what events are being detected by our filesystem watcher by putting a console.log ( event, args ) here and checking the output in the console?Ĭan you also give me a bit more details about your environment, for instance are you synchronizing your notes with some third-party tool? In that case I think notes would be deleted right after the app started. The only way this could perhaps happen is if our filesystem watcher is detecting some rename events that aren't actually happening. Still I don't see how this could cause the deletion of multiple notes in any way. This line of code should basically never get hit, the only way it could get executed is if perhaps there's a race condition with another program that is creating the other file after we check for its existence but before we can rename to it. Here if a note needs to be renamed to something else (because it has been edited and it's title changed), and that something else is already present on disk, we delete the current note and overwrite the other one instead of what we usually do: renaming the current note and then overwriting it.Here, if you tell the app to permanently delete a note we delete it from the disk.Multiple notes got deleted accidentally: we are only deleting notes in 2 places (you can check this yourself by searching the codebase for "File.unlink"): So was the note whose title got selected for you had no content? I suppose we may want to make this check more strict, ensuring that we are only selecting the title if it begins with "Untitled" □ The idea behind this is that perhaps you created a new note, whose initial content might be "# Untitled" and you'd generally want to change its title right away, so we preselect it. Multiple notes get deleted accidentallyĪ note's title is being selected when it shouldn't be: the way it works currently is that a note's title will be selected automatically when that note has no other content.You press enter and the note's title gets removed.You switch to edit mode (I suppose, otherwise you wouldn't be able to edit it).You click a link in that note that points to another note.You're in preview mode (I suppose, otherwise you couldn't click a link in that note).Let me see if I've got the chain of events right: Expected behaviorĭon't delete notes, especially ones that aren't even in the process of being edited! At the same time (I believe), six of the other notes disappeared too! It's possible these weren't exactly correlated in time, but I went pretty quickly from opening Notability, opening the notebook and seeing all the subnotes, opening the top level one, clicking on the link to open a subnote, pressing ENTER, and then noticing a bunch of subnotes disappeared. ![]() I hit enter to start typing a body, and the title disappeared (became "#"). I clicked on one of the links to open the subnote, which at this point had nothing but a title. So what just happened: I had a notebook with 15 notes - a top level one, which linked to 14 subnotes. Unfortunately I hadn't committed these recent changes so I have lost some notes. ![]() Anyway, due to the past issues, I recently added git to my notes directory. I've had data corruption issues in the past but they didn't seem too bad (although now I wonder if I have lost notes I didn't even know I was losing). ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |