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

File tree maxdepth #587

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

File tree maxdepth #587

wants to merge 12 commits into from

Conversation

nullmonk
Copy link
Collaborator

What type of PR is this?

/kind bug
/kind feature

What this PR does / why we need it:

Add permissions check to the file tree tome so it does not crash when encountering an unreadable directory

@nullmonk nullmonk requested a review from hulto February 13, 2024 21:14
Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.76%. Comparing base (1cad69f) to head (fdd8d60).
Report is 56 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #587      +/-   ##
==========================================
+ Coverage   70.97%   71.76%   +0.78%     
==========================================
  Files         161      175      +14     
  Lines       10776    12111    +1335     
==========================================
+ Hits         7648     8691    +1043     
- Misses       2949     3205     +256     
- Partials      179      215      +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

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

Couple thoughts then it should be good to go

tavern/tomes/file_list/main.eldritch Outdated Show resolved Hide resolved
tavern/tomes/file_tree/metadata.yml Outdated Show resolved Hide resolved
tavern/tomes/file_tree/main.eldritch Outdated Show resolved Hide resolved
tavern/tomes/file_tree/metadata.yml Show resolved Hide resolved
hulto
hulto previously approved these changes Feb 15, 2024
Copy link
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

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

Looks good to me

Not working on windows.

tavern/tomes/file_tree/main.eldritch Outdated Show resolved Hide resolved
if isinstance(depth, str) and not depth.lstrip("-").isdigit():
print("ERROR: Invalid depth specified, must be a valid number")
return
depth=int(depth)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seem redundant with the above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What do you mean redundant? -1 is not handled properly by the is digit function. This also gracefully exits rather than just crashing

tavern/tomes/file_tree/main.eldritch Outdated Show resolved Hide resolved
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.

None yet

2 participants