Skip to content

Commit 5e9d782

Browse files
author
Joseph C Wang
committed
fixes situation where there is no display name
This is needed to get nextcloud dav to work.
1 parent 9a9cea0 commit 5e9d782

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

webdavfs/webdavfs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,9 @@ def getinfo(self, path, namespaces=None):
246246
else:
247247
try:
248248
info = self.client.info(_path.encode('utf-8'))
249+
# displayname is optional
250+
if info['name'] is None:
251+
info['name'] = _path.split("/")[-1]
249252
info_dict = self._create_info_dict(info)
250253
if self.client.is_dir(_path.encode('utf-8')):
251254
info_dict['basic']['is_dir'] = True

0 commit comments

Comments
 (0)