diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-02-15 09:45:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-15 09:45:45 +0100 |
| commit | 728be34ebc716aa90cc525b42282d6c9f461b67b (patch) | |
| tree | b9b6cacd2e1e035bd534c76392262ef83ef4596e /src/libstd/sys/unix/stack_overflow.rs | |
| parent | afea30dc27b781e4a9843d7b39b0aa32426c1df1 (diff) | |
| parent | 8fb8bb4b3ff25570a7a9b105c1a569bb2307f25f (diff) | |
| download | rust-728be34ebc716aa90cc525b42282d6c9f461b67b.tar.gz rust-728be34ebc716aa90cc525b42282d6c9f461b67b.zip | |
Rollup merge of #69106 - RReverser:wasi-fs-copy, r=KodrAus
Fix std::fs::copy on WASI target Previously `std::fs::copy` on wasm32-wasi would reuse code from the `sys_common` module and would successfully copy contents of the file just to fail right before closing it. This was happening because `sys_common::copy` tries to copy permissions of the file, but permissions are not a thing in WASI (at least yet) and `set_permissions` is implemented as an unconditional runtime error. This change instead adds a custom working implementation of `std::fs::copy` (like Rust already has on some other targets) that doesn't try to call `set_permissions` and is essentially a thin wrapper around `std::io::copy`. Fixes #68560.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
