sxyazi / yazi

πŸ’₯ Blazing fast terminal file manager written in Rust, based on async I/O.
https://yazi-rs.github.io
MIT License
14.31k stars 330 forks source link

Strange behaviour when renaming a file with only case changes #1147

Closed thomasschafer closed 2 months ago

thomasschafer commented 3 months ago

What system are you running Yazi on?

macOS

What terminal are you running Yazi in?

alacritty 0.13.2 (bb8ea18)

Did you try the latest code to see if this problem got fixed?

Tried, but the problem still

yazi --debug output

Yazi
    Version: 0.2.5 (189cb81 2024-06-11)
    Debug  : false
    OS     : macos-aarch64 (unix)

Ya
    Version: No such file or directory (os error 2)

Emulator
    Emulator.via_env: ("tmux-256color", "tmux")
    Emulator.via_csi: Ok(Unknown([Sixel]))
    Emulator.detect : Unknown([Sixel])

Adapter
    Adapter.matches: Sixel

Desktop
    XDG_SESSION_TYPE: None
    WAYLAND_DISPLAY : None
    DISPLAY         : None

SSH
    shared.in_ssh_connection: false

WSL
    /proc/sys/fs/binfmt_misc/WSLInterop: false

Variables
    SHELL              : Some("/bin/zsh")
    EDITOR             : Some("hx")
    ZELLIJ_SESSION_NAME: None
    YAZI_FILE_ONE      : None
    YAZI_CONFIG_HOME   : None

Text Opener
    default: Some(Opener { run: "hx \"$@\"", block: true, orphan: false, desc: "hx", for_: None, spread: true })
    block  : Some(Opener { run: "hx \"$@\"", block: true, orphan: false, desc: "hx", for_: None, spread: true })

tmux
    TMUX   : false
    Version: 3.4

Dependencies
    file             : 5.41
    ueberzugpp       : No such file or directory (os error 2)
    ffmpegthumbnailer: 2.2.2
    magick           : No such file or directory (os error 2)
    fzf              : 0.52.0
    fd               : 10.1.0
    rg               : 14.1.0
    chafa            : No such file or directory (os error 2)
    zoxide           : 0.9.4
    unar             : 1.10.7
    jq               : 1.7.1

--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "/Users/tschafer/.local/state/yazi" directory.

Logs:

  2024-06-11T16:02:19.239647Z  WARN yazi_adapter::emulator: [Adapter] No special environment variables detected
    at yazi-adapter/src/emulator.rs:70

  2024-06-11T16:02:19.239725Z  WARN yazi_adapter::emulator: [Adapter] Unknown TERM_PROGRAM: tmux
    at yazi-adapter/src/emulator.rs:84

  2024-06-11T16:02:19.239729Z  WARN yazi_adapter::emulator: [Adapter] Unknown TERM: tmux-256color
    at yazi-adapter/src/emulator.rs:92

Describe the bug

When changing a filename with a case-only change (e.g. foo too foO), a prompt is shown asking Overwrite an existing file? (y/N), and then both the new file name and the old file name are shown, even though only the new file exists.

The screen recording below shows the issue when renaming foo to foO, and then a rename from foO to foOa which shows the expected behaviour:

https://github.com/sxyazi/yazi/assets/54135831/e52b3f09-89d0-4826-86d6-db7f28aa437e

Expected Behavior

Case changes should behave the same as other name changes

To Reproduce

Rename a file with a case-only change, e.g. foo to foO

Configuration

No config

Anything else?

No response

sxyazi commented 2 months ago

Please try https://github.com/sxyazi/yazi/pull/1151

thomasschafer commented 2 months ago

Please try #1151

That works! Thank you so much for getting this sorted so quickly πŸ™Œ

mikavilpas commented 2 months ago

Nice - I think I saw this at some point but realized it too late, and didn't figure out this was the cause πŸ‘πŸ»

github-actions[bot] commented 1 month ago

I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.