Skip to content

Comments

Add "readable" option to hide unreadable files#35

Open
PacAnimal wants to merge 3 commits intogburca:masterfrom
PacAnimal:master
Open

Add "readable" option to hide unreadable files#35
PacAnimal wants to merge 3 commits intogburca:masterfrom
PacAnimal:master

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