Skip to content

Commit

Permalink
Merge pull request #28 from dxrcy/main
Browse files Browse the repository at this point in the history
Check if watched file was recreated after remove
  • Loading branch information
rozukke authored Sep 20, 2024
2 parents 91cc6e7 + c5d51c1 commit 1a9eddd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ fn main() -> miette::Result<()> {
Flow::Continue
}
EventKind::Remove(_) => {
message(Red, "Error", "watched file was deleted. Exiting...");
std::process::exit(1);
if name.exists() {
Flow::Continue
} else {
message(Red, "Error", "watched file was deleted. Exiting...");
std::process::exit(1);
}
}
_ => Flow::Continue,
})
Expand Down

0 comments on commit 1a9eddd

Please sign in to comment.