diff options
| author | bors <bors@rust-lang.org> | 2017-10-03 22:19:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-10-03 22:19:40 +0000 |
| commit | bd90aa6daa5b73c2be85f604129ee40a6734cb6b (patch) | |
| tree | 20f4643c039a026cf67841323ca42b18eae2dd3b /src/libstd/sync | |
| parent | 4502e2aa9c28d8caa610fc1815fd9c5b5a16e91c (diff) | |
| parent | 61c0c9e5f21f231bca1c5594c2b6616e419b86fc (diff) | |
| download | rust-bd90aa6daa5b73c2be85f604129ee40a6734cb6b.tar.gz rust-bd90aa6daa5b73c2be85f604129ee40a6734cb6b.zip | |
Auto merge of #44895 - stephaneyfx:master, r=dtolnay
Made `fs::copy` return the length of the main stream On Windows with the NTFS filesystem, `fs::copy` would return the sum of the lengths of all streams, which can be different from the length reported by `metadata` and thus confusing for users unaware of this NTFS peculiarity. This makes `fs::copy` return the same length `metadata` reports which is the value it used to return before PR #26751. Note that alternate streams are still copied; their length is just not included in the returned value. This change relies on the assumption that the stream with index 1 is always the main stream in the `CopyFileEx` callback. I could not find any official document confirming this but empirical testing has shown this to be true, regardless of whether the alternate stream is created before or after the main stream. Resolves #44532
Diffstat (limited to 'src/libstd/sync')
0 files changed, 0 insertions, 0 deletions
