We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Which operating system and Python version are you using? Windows 11, Python 3.9.6
Which version of this project are you using? 0.1.3
What did you do?
iterdir()
What did you expect to see? Correct paths of each of the files
What did you see instead? Extra slash in the paths. I get the expected result:
ls()
>>> # scenario 1 >>> spath = UPath('s3://tj.test.bucket/firstsubfolder/') # note trailing slash >>> for f in spath.iterdir(): ... print(f) ... s3://tj.test.bucket/firstsubfolder// s3://tj.test.bucket/firstsubfolder//file_1.txt s3://tj.test.bucket/firstsubfolder//file_2.txt s3://tj.test.bucket/firstsubfolder//file_3.txt >>> >>> # scenario 2 - same spath but using filesystem.ls >>> for f in spath.fs.ls(str(spath)): ... print(f) ... tj.test.bucket/firstsubfolder/ tj.test.bucket/firstsubfolder/file_1.txt tj.test.bucket/firstsubfolder/file_2.txt tj.test.bucket/firstsubfolder/file_3.txt >>> >>> # scenario 3 - no trailing slash >>> spath = UPath('s3://tj.test.bucket/firstsubfolder') # note NO trailing slash >>> for f in spath.iterdir(): ... print(f) ... s3://tj.test.bucket/firstsubfolder/ s3://tj.test.bucket/firstsubfolder/file_1.txt s3://tj.test.bucket/firstsubfolder/file_2.txt s3://tj.test.bucket/firstsubfolder/file_3.txt
The text was updated successfully, but these errors were encountered:
Hi @theogaraj,
Thank you for reporting the issue! I can reproduce it locally. Will need to think a bit about how to fix this together with #144.
Cheers, Andreas
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Which operating system and Python version are you using?
Windows 11, Python 3.9.6
Which version of this project are you using?
0.1.3
What did you do?
iterdir()
method.What did you expect to see?
Correct paths of each of the files
What did you see instead?
Extra slash in the paths.
I get the expected result:
ls()
method.The text was updated successfully, but these errors were encountered: