-
Notifications
You must be signed in to change notification settings - Fork 2.1k
mv allows moving a directory into itself #13508
Copy link
Copy link
Closed
Labels
A:file-systemRelated to commands and core nushell behavior around the file systemRelated to commands and core nushell behavior around the file systemcategory:upstreamproblem with upstream dependencyproblem with upstream dependencydeprecated:duplicate(deprecated: use GitHub's "close as duplicate" feature) This issue is a duplicate of another issue(deprecated: use GitHub's "close as duplicate" feature) This issue is a duplicate of another issuestatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look
Milestone
Description
Describe the bug
The detection of cannot move X to a subdirectory of itself, X/Y is imperfect, and it is sometime still possible to execute the move, resulting in the directory disappearing.
How to reproduce
korsika in /tmp/foo
➜ mkdir foo/bar-blubb/alt 1 2 3
korsika in /tmp/foo
➜ mv * foo/bar-blubb/alt
korsika in /tmp/foo
➜ ls
╭────────────╮
│ empty list │
╰────────────╯
Expected behavior
Error message.
Configuration
| key | value |
|---|---|
| version | 0.96.0 |
| major | 0 |
| minor | 96 |
| patch | 0 |
| branch | |
| commit_hash | |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.79.0 (129f3b996 2024-06-10) (built from a source tarball) |
| cargo_version | cargo 1.79.0 |
| build_time | 1980-01-01 00:00:00 +00:00 |
| build_rust_channel | release |
| allocator | mimalloc |
| features | default, sqlite, system-clipboard, trash |
| installed_plugins |
(As obtained from github:NixOS/nixpkgs/3fcada1050e3820241590679838954bacf7d38f8#nushell.)
korsika in /tmp/foo
➜ findmnt -T .
TARGET
SOURCE FSTYPE OPTIONS
/ /dev/dm-0 btrfs rw,relatime,ssd,space_cache=v2,subvolid=5,subvol=/
Additional context
This is not a duplicate of #2612, that's still sound and fixed..
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:file-systemRelated to commands and core nushell behavior around the file systemRelated to commands and core nushell behavior around the file systemcategory:upstreamproblem with upstream dependencyproblem with upstream dependencydeprecated:duplicate(deprecated: use GitHub's "close as duplicate" feature) This issue is a duplicate of another issue(deprecated: use GitHub's "close as duplicate" feature) This issue is a duplicate of another issuestatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look