-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
Description
Describe the bug
Calling boost::filesystem::canonical(path) on a non-existent path causes a crash with the following error:
what(): boost::filesystem::canonical: No such file or directory: "some/nonexistent/path"
Since canonical requires the path to exist, it throws a boost::filesystem::filesystem_error, leading to an unexpected crash instead of providing a fallback or error-handling mechanism.
Steps to reproduce the behavior
- Pass a non-existent path to boost::filesystem::canonical, e.g., "/some/nonexistent/path".
- Run the application.
- Observe that the program throws an exception and crashes.
Expected behavior
Instead of crashing, canonical should provide a way to handle non-existent paths gracefully. A better approach would be:
- Returning an error code or exception (try catch) that can be caught without a crash.
Desktop:
- Architecture - arm64
Reactions are currently unavailable