rnote icon indicating copy to clipboard operation
rnote copied to clipboard

the `.rnote` file appears twice when saving the file in the opened workspace.

Open Doublonmousse opened this issue 1 year ago • 3 comments

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:

  1. open rnote and save a rnote file in the opened workspace
  2. see the document appear twice in the workspace bar
  3. This is not updated if the workspace view is closed then opened again
  4. 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
image

Desktop (please complete the following information):

  • OS: Mac os Sonoma
  • App Version: main commit 0d98bc9
  • Installation Source: compiled from source

Doublonmousse avatar Feb 17 '24 21:02 Doublonmousse

#1033 Also seems to partially fix this issue. The file is not duplicated anymore.

image

However it does not appear in the same section as the rest of the .rnote file until a refresh occurs.

Doublonmousse avatar Feb 28 '24 20:02 Doublonmousse

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.

flxzt avatar Feb 29 '24 14:02 flxzt

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 ?

Doublonmousse avatar Mar 10 '24 16:03 Doublonmousse