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

fix(list_dir): check permissions and consider workspace filters config #2279

Merged
merged 7 commits into from
Jan 9, 2025

Conversation

MartinBelthle
Copy link
Contributor

@MartinBelthle MartinBelthle commented Dec 20, 2024

Will fix back-end issues inside [ANT-615]

@MartinBelthle MartinBelthle self-assigned this Dec 20, 2024
@pull-request-size pull-request-size bot added size/M and removed size/S labels Dec 20, 2024
child.is_dir()
and not is_study_folder(child)
and not should_ignore_folder_for_scan(child)
and not child.name.startswith((".", "$"))
Copy link
Contributor

Choose a reason for hiding this comment

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

the name check for hidden file doesn't work on windows, does it?

Copy link
Contributor Author

@MartinBelthle MartinBelthle Jan 3, 2025

Choose a reason for hiding this comment

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

I removed this code to use the workspace filters to mutualize the code

@MartinBelthle MartinBelthle changed the title fix(list_dir): check permissions and remove .* and $* folders fix(list_dir): check permissions and consider workspace filters config Jan 3, 2025
return False
return not (
path.is_dir()
and any([re.search(regex, path.name) for regex in filter_in])
Copy link
Contributor

Choose a reason for hiding this comment

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

do you need to use a list here instead of just the generator ? like this any(re.search(regex, path.name) for regex in filter_in)

@MartinBelthle MartinBelthle merged commit 5f4adff into dev Jan 9, 2025
12 of 13 checks passed
@MartinBelthle MartinBelthle deleted the fix/list-dir-endpoint branch January 9, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants