[BUG] Renaming with the intent to overwrite causes odd behaviour
CompletedMore rename testing has uncovered another issue. As with the other I reported, it looks like data loss at first glance, but upon closer inspection it is just a sidebar refresh issue along with a lack of warning being provided:
1. Create a new note called "first" and type in "This is the first note." into the editor.
2. Create a second note called "second" and type in "This is the second note." into the editor.
3. `⌘L` and `⎋` to show the full sidebar, click between "first.txt" and "second.txt".
3. Double-click on "second.txt" in the sidebar to rename it, and call it "first.txt".
The "second.txt" file vanishes. All we are left with is "first.txt", with its content in the editor.
4. Press `⌘L` and create a new note called "third", with "This is the third note." as its content.
5. `⌘L` + `⎋` to reveal the full sidebar.
"second.txt" remains entirely missing.
As noted, this is not a data loss bug. If you reload the Folder everything is copacetic, and if you leave Finder open to the side you'll see "second.txt" never really does vanish.
So the problem is in two parts:
* There should be a warning when attempting to overwrite. It's probably best to leave it up to the user whether they really want to do that.
* Something in how the sidebar content is populated isn't discovering this file once that happens, even though it otherwise tends to track pretty well with the disk.
nvUltra: Version 1.0.0 (20)
macOS: 10.14.4 / AFPS
-
Official comment
FIXED to prevent renaming to an existing filename.
Thanks!
-
You may run into this problem while looking into the above, but since my precise notes occlude the result, I figured I should note another odd behaviour that can occur with renaming:
1. In this test, simply create the "first" note, content arbitrary.
2. Double-click on the note in the sidebar and rename it to "second.md".
3. `⌘L` + `⎋`.
Both the original "first.md" note and the renamed "second.md" note will appear in the sidebar. "first.md" will be a null entry (blank document icon). On the disk itself, only "second.md" will appear, as expected.
So this is another sidebar population bug. It strikes me you may not see it, having already fixed a few others, and given you aren't seeing the case where deleting a file from the disk using Finder/shell also removes the entry from the sidebar. I.e. it might be a side-effect of the lack of removal that exists in build 20.
0
Please sign in to leave a comment.
Comments
2 comments