Skip to content

Commit 8e6ae64

Browse files
author
Travis Cunningham
committed
Merge pull request #1 from smartfile/add-basic-info
Add some basic information instead of returning blank info for the root
2 parents 17aa578 + 6fc97b5 commit 8e6ae64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/ftpfs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ class FTPFS(FS):
865865
'atomic.rename' : True,
866866
'atomic.setcontents' : False,
867867
'file.read_and_write' : False,
868+
'mime_type': 'virtual/ftp',
868869
}
869870

870871
def __init__(self, host='', user='', passwd='', acct='', timeout=_GLOBAL_DEFAULT_TIMEOUT, port=21, dircache=True, follow_symlinks=False):
@@ -1350,7 +1351,7 @@ def rename(self, src, dst):
13501351
def getinfo(self, path):
13511352
dirlist, fname = self._check_path(path)
13521353
if not fname:
1353-
return {}
1354+
return { 'size': 0, 'isdir': True, 'isfile': False }
13541355
info = dirlist[fname].copy()
13551356
info['modified_time'] = datetime.datetime.fromtimestamp(info['mtime'])
13561357
info['created_time'] = info['modified_time']

0 commit comments

Comments
 (0)