Include symlink destination in path info.#169
Merged
pohmelie merged 3 commits intoaio-libs:masterfrom Dec 11, 2024
Merged
Conversation
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.
Collaborator
|
FTP protocol have nothing about |
|
+1 for this change. With current implementation there is no way to know if the size is valid. |
nE0sIghT
added a commit
to nE0sIghT/apt-mirror2
that referenced
this pull request
Jan 7, 2024
There is no way to know if the file is link with current aioftp's LIST parsing implementation, however we can use custom parser to insert link info and try to stat link destination. See-Also: aio-libs/aioftp#169
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #169 +/- ##
=======================================
Coverage 98.89% 98.89%
=======================================
Files 6 6
Lines 1895 1896 +1
=======================================
+ Hits 1874 1875 +1
Misses 21 21 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What do these changes do?
The existing
parse_list_line_unixfunction goes to all the work of parsing symlink lines, but omits the actual destination of the symlink. This tiny change adds the parsed destination to the path's info dictionary.Are there changes in behavior for the user?
One extra key is included in the
infodict when issuing aLISTcommand to a unix server.Related issue number
Checklist
CHANGESfolder<issue_id>.<type>(e.g.588.bugfix)issue_idchange it to the pr id after creating the PR.feature: Signifying a new feature..bugfix: Signifying a bug fix..doc: Signifying a documentation improvement..removal: Signifying a deprecation or removal of public API..misc: A ticket has been closed, but it is not of interest to users.Fix issue with non-ascii contents in doctest text files.