pysmbc icon indicating copy to clipboard operation
pysmbc copied to clipboard

Cannot open directory "." with opendir()

Open nyddogghr opened this issue 4 years ago • 0 comments

Hi, I am implementing samba support in a python 3.5.10 software. I'm using version 1.0.15.6 (the one available on debian stretch, see https://packages.debian.org/stretch/python3-smbc). I also tried directly with 1.0.23. I have an issue when trying to list "." (current directory).

>>> context.opendir("smb://user:password@host:139/share/.")
smbc errno NT_STATUS_OBJECT_NAME_INVALID -> 22
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: (22, 'Invalid argument')

However, when I just remove the ".", I can use opendir(url).getdents() and I do get the two specific resources "." and ".." (as well as all other resources).

Is this normal?

Thanks

nyddogghr avatar Dec 14 '20 14:12 nyddogghr