webdavfs icon indicating copy to clipboard operation
webdavfs copied to clipboard

The 'getinfo' method returns an extra root path

Open y805939188 opened this issue 1 year ago • 1 comments

When I execute the function listdir() to get file list, if there is a path in url, the method will return an extra path name. There is a test directory in my root path: image My code attempts to obtain a list of files in the test directory:

url = 'http://localhost:6666/test'
handle = WebDAVFS(url, login='admin', password='admin')
test = handle.listdir('./')
print(list(test))

I expected to only get 'c.txt' and 'd. txt', but now I will get an extra 'test': image

y805939188 avatar Feb 21 '24 05:02 y805939188

I met similar problem. Actually the code should be like:

url = 'http://localhost:6666'
handle = WebDAVFS(url, login='admin', password='admin', root='test')
test = handle.listdir('./')
print(list(test))

weijia avatar Nov 03 '24 14:11 weijia