Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of directory renames / moves #134

Closed
srid opened this issue Sep 20, 2021 · 3 comments
Closed

Improve handling of directory renames / moves #134

srid opened this issue Sep 20, 2021 · 3 comments
Assignees
Milestone

Comments

@srid
Copy link
Owner

srid commented Sep 20, 2021

Emanote (via Ema.Helper.FileSystem) does not handle renames and moving of directories as we would expect ... thus requiring the user to restart emanote when these things happen. Instead, we should automate it. Either by handing the updated files recursively (error prone?) or by restarting the internal model state tracker ourselves.

@srid srid added this to the First release milestone Sep 20, 2021
@srid srid self-assigned this Sep 20, 2021
@srid
Copy link
Owner Author

srid commented Sep 21, 2021

Even file moves (mv foo.md bar/qux/foo.md) can lead to inconsistent internal state, leading to errors like this:

[Debug#WS.Client.10] <~~ ["brazil-cerrado"]
attempt to encode a non-existance note route: Identity R[/2021-09-21.md]
CallStack (from HasCallStack):
  error, called at src/Relude/Debug.hs:218:11 in relude-0.7.0.0-CnCT2EZE7nm5s1uXLlAUNA:Relude.Debug
  error, called at src/Emanote/Route/SiteRoute/Class.hs:90:22 in main:Emanote.Route.SiteRoute.Class
  encodeResourceRoute, called at src/Emanote/Route/SiteRoute/Class.hs:52:11 in main:Emanote.Route.SiteRoute.Class

@srid
Copy link
Owner Author

srid commented Sep 23, 2021

Relevant on the fsnotify side: fsnotify/fsnotify#26

srid added a commit that referenced this issue Sep 24, 2021
@srid
Copy link
Owner Author

srid commented Sep 24, 2021

1a8e922 should be good enough for now.

@srid srid closed this as completed Sep 24, 2021
shivaraj-bh pushed a commit to shivaraj-bh/emanote that referenced this issue Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant