Skip to content

Commit

Permalink
Include symlink destination in path info.
Browse files Browse the repository at this point in the history
The existing `parse_list_line_unix` function goes to all the work of parsing symlink lines, but omits the actual destination of the symlink. This tiny change adds parsed destination to the path's info dictionary.
  • Loading branch information
rcfox authored Nov 26, 2023
1 parent d9cbdd6 commit 4394925
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/aioftp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ def parse_list_line_unix(self, b):
link_src = s[:i]
i = -2 if link_dst[-1] == "'" or link_dst[-1] == '"' else -1
info["type"] = "dir" if link_dst[i] == "/" else "file"
info["link_dst"] = link_dst
s = link_src
return pathlib.PurePosixPath(s), info

Expand Down

0 comments on commit 4394925

Please sign in to comment.