Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not output . and .. in client.list(*, recursive=True) as these create symlink loop on all ftp servers with UNIX systems #166

Merged
merged 8 commits into from
Jul 12, 2023

Conversation

CrafterKolyan
Copy link
Contributor

@CrafterKolyan CrafterKolyan commented Jul 11, 2023

What do these changes do?

Fix a bug when you use client.list(path, recursive=True) and never get out of it due to symlink loop with . and ...

Are there changes in behavior for the user?

Yes, if users had files . and .. previously in the output of client.list(path) then they won't see them now.
Also client.list(path, recursive=True) will now work for UNIX systems

Testing

Tested these changes on FTP server with UNIX filesystem

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> (e.g. 588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the PR
    • ensure type is one of the following:
      • .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.
    • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.

aioftp/client.py Outdated Show resolved Hide resolved
aioftp/client.py Outdated Show resolved Hide resolved
history.rst Show resolved Hide resolved
aioftp/client.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@pohmelie pohmelie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix linter error

@CrafterKolyan
Copy link
Contributor Author

Please rerun workflow

@pohmelie pohmelie changed the title Don't output . and .. in client.list(*, recursive=True) as these create symlink loop on all ftp servers with UNIX systems do not output . and .. in client.list(*, recursive=True) as these create symlink loop on all ftp servers with UNIX systems Jul 12, 2023
@pohmelie pohmelie merged commit 9440a16 into aio-libs:master Jul 12, 2023
2 of 6 checks passed
@CrafterKolyan CrafterKolyan deleted the patch-1 branch July 12, 2023 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants