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

Refactor path handling for platform independence #67

Closed
wants to merge 1 commit into from

Commits on May 27, 2024

  1. Refactor path handling for platform independence

    This commit addresses issues with path handling in the Gitignore parsing library, ensuring compatibility across different platforms such as Unix and Windows. Key changes include:
    
    - Updated the regular expression handling in the fnmatch_pathname_to_regex function to accommodate both Unix and Windows path separators.
    - Added path normalization before processing to ensure consistency in path representation, replacing backslashes with forward slashes.
    - Modified the construction of regular expressions to handle both types of path separators, making the matching process platform-independent.
    
    These adjustments enable the library to correctly parse Gitignore files on Windows systems, resolving issues with path matching and improving overall compatibility.
    vinitsiriya committed May 27, 2024
    Configuration menu
    Copy the full SHA
    d7525b3 View commit details
    Browse the repository at this point in the history