Skip to content

Commit

Permalink
[Fix] RecursionError
Browse files Browse the repository at this point in the history
  • Loading branch information
wxy1343 committed Jan 14, 2022
1 parent 9d3c941 commit fed1823
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion aliyunpan/about.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.0.4'
__version__ = '3.0.5'
9 changes: 5 additions & 4 deletions aliyunpan/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ def get_fid_list(self, file_id, update=True):
return [i.data for i in self._tree.children(file_id)]

def get_path_fid(self, path, file_id='root', update=True):
path = AliyunpanPath(path)
if str(path) in ('', '/', '\\', '.', 'root'):
return 'root'
path = AliyunpanPath(path)
flag = False
path_list = list(filter(None, path.split()))
if path_list[0] == 'root':
Expand Down Expand Up @@ -248,6 +248,7 @@ def __sub__(self, other: Path):
def __add__(self, other):
return Path(self.__str__()) / Path(str(other))


if __name__ == '__main__':
print(AliyunpanPath('/a/b/c') + AliyunpanPath('1'))
@property
def parent(self):
p = self.__str__().rsplit('/', 1)[0]
return p if p else '/'

0 comments on commit fed1823

Please sign in to comment.