Skip to content

Commit

Permalink
tail: fix -f for non-linux systems
Browse files Browse the repository at this point in the history
  • Loading branch information
jhscheer committed Jun 21, 2022
1 parent 76f5c0e commit 2670b51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uu/tail/src/tail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ impl WatcherExtTail for dyn Watcher {
/// Wrapper for `notify::Watcher::watch` to also add the parent directory of `path` if necessary.
fn watch_with_parent(&mut self, path: &Path) -> UResult<()> {
let mut path = path.to_owned();
if path.is_file() {
if cfg!(target_os = "linux") && path.is_file() {
/*
NOTE: Using the parent directory instead of the file is a workaround.
This workaround follows the recommendation of the notify crate authors:
Expand Down

0 comments on commit 2670b51

Please sign in to comment.