Hi, we use fs_extra in Nushell; thanks for writing it!
We recently had a scary bug report, and it looks like the root cause is fs_extra::dir::move_dir(). If you use move_dir() to change the case of a directory name on Windows (ex: "Test" -> "test"), the directory is deleted and fs_extra reports success.
For example:
// This deletes the directory named Test and does not panic!
fs_extra::dir::move_dir("Test", "test", &options).unwrap();
Steps to Reproduce
I've put together a minimal repro: https://github.com/rgwood/fs-extra-repro
Version Info
fs-extra v1.2.0
Windows 11 (can't reproduce on Linux)
rustc v1.63.0
Hi, we use
fs_extrain Nushell; thanks for writing it!We recently had a scary bug report, and it looks like the root cause is
fs_extra::dir::move_dir(). If you usemove_dir()to change the case of a directory name on Windows (ex: "Test" -> "test"), the directory is deleted andfs_extrareports success.For example:
Steps to Reproduce
I've put together a minimal repro: https://github.com/rgwood/fs-extra-repro
Version Info
fs-extrav1.2.0Windows 11 (can't reproduce on Linux)
rustc v1.63.0