diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-05-29 01:23:34 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-05-31 19:14:39 +0300 |
commit | 3d18446acef5462e946fe79909b198b35c2bbfa0 (patch) | |
tree | eb60dab710569543bb8dd314e63eda745a4c166c /bpkg/checksum.cxx | |
parent | 45e82ae43be6444b0260daaf08eeb084eddbdb34 (diff) |
Port to MinGW
Diffstat (limited to 'bpkg/checksum.cxx')
-rw-r--r-- | bpkg/checksum.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bpkg/checksum.cxx b/bpkg/checksum.cxx index 95f2d80..3c9c4e5 100644 --- a/bpkg/checksum.cxx +++ b/bpkg/checksum.cxx @@ -269,7 +269,12 @@ namespace bpkg try { - return f (sha256_path, o.sha256_option ()); + process pr (f (sha256_path, o.sha256_option ())); + + // Prevent any data modifications on the way to the hashing program. + // + fdmode (pr.out_fd, fdtranslate::binary); + return pr; } catch (const process_error& e) { |