Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "readable" option to hide unreadable files #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

PacAnimal
Copy link

Using rofs as a filter, I decided to add an option to filter out unreadable files, such as dead symlinks and things you don't have permission to access on a remote file share.

I use this to filter a mounted share from a Windows machine, so the backup software the Linux box uses doesn't generate hundreds of errors for all the files the Windows user can see but can't access.

I also cleaned up some whitespace, and renamed the "name" variable to "path", as that's what's commonly passed to it.

Thought it might be useful for others, too.

bolt and others added 3 commits June 7, 2020 15:39
Copy link
Owner

@gburca gburca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch. Looks good. Can you rename readable to hide_unreadable (with underscore and dash as appropriate) so the effect of the option is more obvious.

log_msg(LOG_DEBUG, "should_hide: %s %07o", name, mode);
log_msg(LOG_DEBUG, "should_hide: %s %07o", path, mode);
if (conf.readable) {
char *trpath=translate_path(path);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces missing around assignment operator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants