Skip to content

Watch is silent if you can't access a file due to parent dir's permissions #38

Description

@jsvd

Calling watch on "/tmp/logs/log1.txt", if the user doesn't have access to "/tmp/logs" then there will be no errors or warnings.

Dir.glob will be called on it, will be empty, but File.file?("/tmp/logs/log1.txt") == false so it's just forgotten (https://github.com/jordansissel/ruby-filewatch/blob/master/lib/filewatch/watch.rb#L128)

File.stat on it returns "permission denied" so a patch using that might be the solution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions