-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
another recursive copy #57
Comments
that's circular reference |
yes. i am validating in my fork to prevent it.
happened accidentally during testing and
caused problems.
5
… On Apr 15, 2021, at 5:43 PM, Hiromu OCHIAI ***@***.***> wrote:
that's circular reference
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Let me clarify your point. |
i believe so. things which cause problems...
like an algorithm that runs for 8 hours
in certain cases, for example, always come
back to the programmer. imagine creating
a Doomsday Device. It must not go off
accidentally because that is bad:)
5
… On Apr 15, 2021, at 5:55 PM, Hiromu OCHIAI ***@***.***> wrote:
Let me clarify your point.
Do you mean we, the package, should detect circular reference on behalf of package users?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
yes⛳️
copy dir list first.
that does not solve all problems
but some! i am doing that
in my experimental fork. could
be done in otiai.copy at no cost,
just switch sequence of stmts.
still...
malicious symlinks cannot always
be defeated though, and eventually
pathname length exceeds os
limit. so for safety, skip symlinks
by default. there are no symlinks
in /usr/local/go, for example, and
they are uncommon in applications
programming, i think.
5
… On Apr 21, 2021, at 1:17 AM, Jason Shi ***@***.***> wrote:
Encounter the same issue.
folder -> folder/copy
My guess is that: During the folder list (it is dynamic), it will contain copy folder which will result in infinite folder reference.
Fix suggestion: make sure the list is dynamic, list it before copy folder is created.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
ok, i defeated malicious symlinks - as far as I know. see github.com/enthor/kmdrv0/kopy#testSkipBrokenSymlinks() and test/data/broken/README.txt The only "broken" symlinks which may safely be skipped are of the variety:
Other os.Stat() errors -- when treating the Symlink as just a file -- cannot |
Copy("test/data.copy", "test/data.copy/alltestdata")
Note: when I found the alltestdata and deleted it, MacOS refused to empty the trash
because "pathname too long". I tried sudo rm etc but "invalid operation". So the
solution if cannot empty trash: drag items out of trash to, say, Downloads and
then just "rm" them.
The text was updated successfully, but these errors were encountered: