Comments (2)
I have encountered the same behavior
from adlfs.
This problem comes from the handling of target_path
in _details(...)
method.
https://github.com/fsspec/adlfs/blob/2023.1.0/adlfs/spec.py#L919-L933
if target_path:
if (
len(output) == 1
and output[0]["type"] == "file"
and not self.version_aware
):
# This handles the case where path is a file passed to ls
return output
output = await filter_blobs(
output,
target_path,
delimiter,
version_id=version_id,
versions=versions,
)
This code applies utils.filter_blobs
to output
. But utils.filter_blobs
assumes that target_path
is a directory path.
https://github.com/fsspec/adlfs/blob/2023.1.0/adlfs/utils.py#L34
This is the reason why ls("my_container/path/to/dummy.txt")
in the example returns an empty result.
In addition, if output
contains only one entry and the entry is a file, this code returns output
as it is. As a result, we get nonempty result for ls("my_container/path/to/dummy.txt.1")
(OK) and ls("my_container/path/to/dummy.txt.")
(KO).
I believe that _details(...)
is probably not the best place to apply this filtering (target_path
of this method is not documented and used only by _ls_blobs(...)
). I think the filtering of retrieved entries should be done in _is_blobs(...)
.
from adlfs.
Related Issues (20)
- `find` doesn't accept `maxdepth` parameter HOT 1
- Add use_emulator setting to better align with object_store crate HOT 1
- Current state of the library, milestones and current development HOT 1
- Concurrent download of multiple files HOT 1
- Support virtual directory stubs with uppercase "Hdi_isfolder" metadata HOT 1
- Feature Suggestion: Optional content type when for writing file HOT 2
- Support passing url in AzureBlobFileSystem HOT 1
- Add comment why `aiohttp` is required
- Fix typo in repo About
- Python 3.12 support blocked by aiohttp HOT 1
- Feature Request: Support for Adding Metadata to Blobs
- Runtime warning from missing await HOT 2
- `fs.info()` and `fs.ls(detail=True)` return different etag formats
- Issue with parallel uploads to the same blob
- Can I use a bearer token / entra ID token for authentication? HOT 1
- Parameter anon ignored if set to False
- exists() is missing **kwargs
- object NoneType can't be used in 'await' expression HOT 3
- Does adlfs provide a way to set the content-type when writing a file to azure blob storage? HOT 1
- Does adlfs provide a way to get a file's public cloud url?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adlfs.