Replace string prefix matching with Path.is_relative_to() to correctly handle Windows paths like "C:\" where trailing backslash caused double separator issues (e.g., "C:\\" instead of "C:\"). Changes: - Use Path.is_relative_to() for subdirectory detection (requires Python 3.9+) - Add Windows path handling tests using PureWindowsPath - Update test_utils.py to expect /etc/passwd to be blocked (security fix)
8.5 KiB
8.5 KiB