audeering / audbackend

Manage file storage on different backends
https://audeering.github.io/audbackend/
Other
3 stars 0 forks source link

Maven.ls() does not work as expected for sub-paths #207

Closed hagenw closed 2 months ago

hagenw commented 3 months ago

Running the following code

import tempfile

import audbackend
import audeer

with tempfile.TemporaryDirectory() as tmp:
    host = audeer.mkdir(tmp, "host")
    repo = "repo"
    file = audeer.touch(tmp, "src.pth")
    audbackend.backend.FileSystem.create(host, repo)
    backend = audbackend.backend.FileSystem(host, repo)
    interface = audbackend.interface.Maven(backend)
    interface.put_file(file, "/a.ext", "1.0.0")
    interface.put_file(file, "/a/b.ext", "1.0.0")
    interface.ls()
    interface.ls("/a/")

should return

[('/a.ext', '1.0.0'), ('/a/b.ext', '1.0.0')]
[('/a/b.ext', '1.0.0')]

but instead it returns

[('/a.ext', '1.0.0'), ('/a/b.ext', '1.0.0')]
[('/a.ext', '1.0.0'), ('/a/b.ext', '1.0.0')]

For audbackend.interface.Versioned it works.

hagenw commented 2 months ago

Solved by #210