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

fix: prevent pasting a directory into itself #925

Merged

Conversation

Rolv-Apneseth
Copy link
Contributor

@Rolv-Apneseth Rolv-Apneseth commented Apr 18, 2024

Closes #894

Just the first approach I could think of but let me know if you had something else in mind.

Edit: Figured out a much easier way - did not know about path.startswith haha

@sxyazi sxyazi force-pushed the prevent-directory-being-copied-into-itself branch from fd19a28 to 0c18664 Compare April 20, 2024 02:34
@sxyazi
Copy link
Owner

sxyazi commented Apr 20, 2024

Thanks for the fix!

@sxyazi sxyazi merged commit a0b4ee6 into sxyazi:main Apr 20, 2024
5 checks passed
@Rolv-Apneseth Rolv-Apneseth deleted the prevent-directory-being-copied-into-itself branch April 20, 2024 09:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Protection from copying a directory into itself
2 participants