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

ArtifactoryPath.glob() doesn't support case in the patern #428

Open
dogbert911 opened this issue Aug 12, 2023 · 0 comments
Open

ArtifactoryPath.glob() doesn't support case in the patern #428

dogbert911 opened this issue Aug 12, 2023 · 0 comments

Comments

@dogbert911
Copy link

dogbert911 commented Aug 12, 2023

I have artifacts with capitalize and non-capitalize names. When I'm using glob to search artifacts with capitalize names, it returns all of them. But I expect only capitalized.

Example:

# My artifactory:
# /aaa/file_1.txt
# /aaa/file_2.txt
# /aaa/FILE_3.txt

for p in ArtifactoryPath('aaa').glob('FILE*'):
    print(p)
# Real Out:
# /aaa/file_1.txt
# /aaa/file_2.txt
# /aaa/FILE_3.txt
#
# My expectation:
# /aaa/FILE_3.txt

It happens because compile_pattern function contain next code:

re.compile(fnmatch.translate(pattern), re.IGNORECASE)

to fix it should be next:

- re.compile(fnmatch.translate(pattern), re.IGNORECASE)
+ re.compile(fnmatch.translate(pattern))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant