Skip to content

the mv command takes a long time even if the src and dest on same device. #6029

@hamflx

Description

@hamflx

see

reproduce:

  • clone a large front-end project, on Windows
  • npm install
  • cd node_modules to simulate a file being locked by a process
  • Open a new shell.
  • Run mv node_modules \.nd This command will take a long time and then fail.

is possible to change the fallback to copy only when the std::fs::rename report an ERROR_NOT_SAME_DEVICE/EXDEV error? this will failed immediately rather than takes a long time and then failed.

now it always trying to copy, even if it just an permission error, this takes a long time, and then failed again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions