Skip to content

Commit

Permalink
Check if changed exercise file exists before calling verify.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFroop committed Jul 11, 2019
1 parent 70946b8 commit ba85ca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fn watch(exercises: &[Exercise]) -> notify::Result<()> {
match rx.recv() {
Ok(event) => match event {
DebouncedEvent::Create(b) | DebouncedEvent::Chmod(b) | DebouncedEvent::Write(b) => {
if b.extension() == Some(OsStr::new("rs")) {
if b.extension() == Some(OsStr::new("rs")) && b.exists() {
println!("----------**********----------\n");
let filepath = b.as_path().canonicalize().unwrap();
let exercise = exercises
Expand Down

0 comments on commit ba85ca3

Please sign in to comment.