Skip to content

Commit ba85ca3

Browse files
committed
Check if changed exercise file exists before calling verify.
1 parent 70946b8 commit ba85ca3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fn watch(exercises: &[Exercise]) -> notify::Result<()> {
101101
match rx.recv() {
102102
Ok(event) => match event {
103103
DebouncedEvent::Create(b) | DebouncedEvent::Chmod(b) | DebouncedEvent::Write(b) => {
104-
if b.extension() == Some(OsStr::new("rs")) {
104+
if b.extension() == Some(OsStr::new("rs")) && b.exists() {
105105
println!("----------**********----------\n");
106106
let filepath = b.as_path().canonicalize().unwrap();
107107
let exercise = exercises

0 commit comments

Comments
 (0)