-
Notifications
You must be signed in to change notification settings - Fork 477
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
Permanently deleting folder crashes on Windows #1320
Comments
Seems like this is a really old bug, I checked out version 0.2.4 and it's still there. |
I can reproduce it on my Windows VM, after some investigating, it seems to be a bug in the notify-rs library — on Windows, when the directory being watched no longer exists, it causes the program to crash. Also I noticed this behavior only occurs on Windows with release mode; macOS and Linux don't have this issue. I can reproduce it with the following code through fn main() {
let p = Path::new("C:\\Users\\ika\\Desktop\\abc");
std::fs::create_dir(p).unwrap();
let mut watcher = ::notify::RecommendedWatcher::new(|_| {}, Default::default()).unwrap();
watcher.watch(p, ::notify::RecursiveMode::NonRecursive).unwrap();
// Try to comment on this line you'll see "Exited successfully" printed normally
std::fs::remove_dir_all(p).unwrap();
std::thread::sleep(Duration::from_secs(5));
println!("Exited successfully");
} Unfortunately it's unclear how to fix it right now, |
Hi, I've temporarily pinned |
Thank you, I just tested an it works. |
I'm going to lock this issue because it has been closed for 30 days. ⏳ |
What system are you running Yazi on?
Windows
What terminal are you running Yazi in?
Windows Terminal
yazi --debug
outputDid you try the latest nightly build to see if the problem got fixed?
Yes, and I updated the debug information above (
yazi --debug
) to the nightly that I triedDescribe the bug
When deleting a folder permanently (i.e.
D
), the app just crashes with errorSTATUS_ILLEGAL_INSTRUCTION
. I checked the log inyazi/state
but no error was logged there. Interestingly, it only crashes with--release
build, while--debug
build works fine.Expected Behavior
The app does not crash.
To Reproduce
D
to delete the folder permanentlyConfiguration
No response
Anything else?
Recording.2024-07-21.005523.mp4
No response
The text was updated successfully, but these errors were encountered: