mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
The path validation logic in Config.isPathAllowed failed when attempting to write a new file to a directory that is a symbolic link. This happened because fs.realpathSync fails on non-existent paths, falling back to an unresolved path which then mismatches with the resolved project temporary directory during the isSubpath check. This commit updates resolveToRealPath to robustly resolve parent directories even if the leaf file does not exist, and updates isPathAllowed to use this improved helper.