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

Normalize drive letters when resolving paths on Windows #609

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jun 15, 2024

  1. Normalize drive letters when resolving paths on Windows

    When it comes to resolving paths on Windows, even though the underlying
    API expects drive letter prefixes to be uppercase, some sources (e.g.
    environment variables like `=C:`) won't normalize components, instead
    returning the value as-is. While this wouldn't be a problem normally as
    NTFS is case-insensitive on Windows, this introduces duplicates in the
    database when adding new entries via `zoxide add`:
    
    ```batchfile prompt
    > zoxide query --list
    D:\
    d:\
    D:\coding
    d:\coding
    D:\coding\.cloned
    d:\coding\.cloned
    ```
    
    This is a cherry-pick from ajeetdsouza#567; see also rust-lang/rust-analyzer#14683.
    
    Signed-off-by: mataha <mataha@users.noreply.github.com>
    mataha committed Jun 15, 2024
    Configuration menu
    Copy the full SHA
    ee5ba87 View commit details
    Browse the repository at this point in the history