about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorStephane Raux <stephaneyfx@gmail.com>2017-09-27 19:43:05 -0700
committerStephane Raux <stephaneyfx@gmail.com>2017-09-27 19:43:05 -0700
commit61c0c9e5f21f231bca1c5594c2b6616e419b86fc (patch)
tree192dd9acb39c9b0db1a241f16d060e8f0e8adb98 /src/test/run-pass/thinlto
parent44d5090a6dbfbcd698ec53ef38981d9747112e0a (diff)
downloadrust-61c0c9e5f21f231bca1c5594c2b6616e419b86fc.tar.gz
rust-61c0c9e5f21f231bca1c5594c2b6616e419b86fc.zip
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/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions