-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 #14574, cp
on files >2GB
#30989
fix #14574, cp
on files >2GB
#30989
Conversation
Copy from /dev/zero to /dev/null? |
base/file.jl
Outdated
bytes = filesize(stat(src_file)) | ||
sendfile(dst_file, src_file, Int64(0), Int(bytes)) | ||
bytes = Int(filesize(stat(src_file))) | ||
offs = Int64(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set this to const -1
b367332
to
f010ad8
Compare
Ok, we can now use libuv's |
When copying a file, keeping that file's mode seems more obvious (when I choose to edit a read-only file, it ought require some overtly permissive act). |
FWIW Python 3 preserves permissions. The fact that Though for a backport we would probably need to preserve the previous behavior. |
Good point, I'll do a backwards-compatible fix first. |
f010ad8
to
8a3b9f2
Compare
Maybe we could have tests that are only run manually, before tagging a release? It sounds problematic to have code paths that are never exercized at all. |
So can this be backported? |
Yes I think so. |
Looks like this didn't make it into 1.1.1. I'll apply the label for 1.2, then hopefully we can get it into rc2. I just hit this issue again today. |
I believe this is already in 1.2. |
Hm, yeah, it does appear to be on the |
What do you mean? This wasn't backported, it was already merged when branching. |
Oh sorry, I'm just confused. Please ignore me. |
There may be a better way to do this, but this is a silly bug to have so here is a simple fix for now.
Also, any ideas on how to test this? Creating multiple GB of files seems like the kind of thing that could disagree with CI systems.