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

Check if we can make a Folder always have a sync engine #11983

Open
erikjv opened this issue Nov 18, 2024 · 1 comment
Open

Check if we can make a Folder always have a sync engine #11983

erikjv opened this issue Nov 18, 2024 · 1 comment

Comments

@erikjv
Copy link
Collaborator

erikjv commented Nov 18, 2024

During construction of a Folder object, a check (checkLocalPath) is done, and the object is only fully initialised when that succeeds. If it fails, the Folder is left incomplete (missing a sync engine, among things), and cannot really be used. This can lead to crashes (#11982) when the engine is accessed anyway.

We should check (and refactor) the Folder construction to be done in a static factory method that can either fail, or produce a valid object.

@DeepDiver1975
Copy link
Member

that can either fail,

or creates a nop folder implementation - this could help to clean up the folder implementation with all the condition checking if _engnie exists of not ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants