Skip to content

handle canonicalize failure in containerized environments#574

Open
venkatesh6114 wants to merge 2 commits intodaisy:mainfrom
venkatesh6114:main
Open

handle canonicalize failure in containerized environments#574
venkatesh6114 wants to merge 2 commits intodaisy:mainfrom
venkatesh6114:main

Conversation

@venkatesh6114
Copy link
Copy Markdown

Description

Fixes #516

path.canonicalize() can fail with ACCESS_DENIED in containerized or sandboxed environments. This caused MathCAT to
bail out entirely when loading rules or reading files.

Changes

  • canonicalize_shim (shim_filesystem.rs): Instead of hard-failing, falls back to returning the path as-is (if
    absolute) or prepending cwd (if relative).
  • read_to_string_shim (shim_filesystem.rs): Replaces the hard bail!() on canonicalize failure with a fallback to
    the original path, letting read_to_string attempt the read anyway.
  • PreferenceManager::initialize (prefs.rs): Same fallback logic applied to rules_dir canonicalization.

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

Successfully merging this pull request may close these issues.

canonicalize() calls fail in restrictive environments (ACCESS_DENIED)

1 participant