the `.rnote` file appears twice when saving the file in the opened workspace.
Describe the bug
When saving a rnote file in an opened workspace, the .rnote file created is displayed twice, until the display is refreshed
To Reproduce
Steps to reproduce the behavior:
- open rnote and save a
rnotefile in the opened workspace - see the document appear twice in the workspace bar
- This is not updated if the workspace view is closed then opened again
- This goes away only when clicking on another workspace then displaying the original workspace again
Expected behavior
See the file appear once.
Console Output
2024-02-17T21:32:42.485427Z DEBUG rnote::canvas: Canvas with title: `duplicated` - output-file monitor emitted `changed` - file: Some("/Users/user/Downloads/test/duplicated.rnote"), other_file: None, event: Created, expect_write: true
2024-02-17T21:32:43.285442Z DEBUG rnote::canvas: Canvas with title: `duplicated` - output-file monitor emitted `changed` - file: Some("/Users/user/Downloads/test/duplicated.rnote"), other_file: None, event: Changed, expect_write: true
2024-02-17T21:32:45.286732Z DEBUG rnote::canvas: Canvas with title: `duplicated` - output-file monitor emitted `changed` - file: Some("/Users/user/Downloads/test/duplicated.rnote"), other_file: None, event: ChangesDoneHint, expect_write: false
Desktop (please complete the following information):
- OS: Mac os Sonoma
- App Version: main commit 0d98bc9
- Installation Source: compiled from source
#1033 Also seems to partially fix this issue. The file is not duplicated anymore.
However it does not appear in the same section as the rest of the .rnote file until a refresh occurs.
Seems to be Mac only, on Linux and Win this does not happen. I wonder if this is a bug in the used DirectoryList, missing a file change event while watching the directory. Because while the file is being written, it might not be recognized as .rnote file, but when it is finished, it should refresh once more and put into the correct section.
Found that this only happen when changing the name of the file and not just keeping the New Document.rnote default name. Seems in this case it creates then rename the file ?