Skip to content
New issue

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

SFTPFS: improper isfile/isdir() results for URL pointing to a file #216

Open
zopyx opened this issue Oct 6, 2015 · 1 comment
Open

SFTPFS: improper isfile/isdir() results for URL pointing to a file #216

zopyx opened this issue Oct 6, 2015 · 1 comment

Comments

@zopyx
Copy link

zopyx commented Oct 6, 2015

Point SFTPFS to a file instead of a directory returns improper results for isdir()

from fs.sftpfs import SFTPFS

handle = SFTPFS('localhost', '/tmp')
print handle.isdir('.') # True
print handle.isfile('.') # False

handle = SFTPFS('localhost', '/tmp/fswrapper.py')
print handle.isdir('.') # True !!!!!!
print handle.isfile('.') # True
@willmcgugan
Copy link
Member

I think the bug there is that it let you open a filesystem with a file path in the first place. It would probably be best to throw an exception in the constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants