From 3d18446acef5462e946fe79909b198b35c2bbfa0 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 29 May 2016 01:23:34 +0300 Subject: Port to MinGW --- bpkg/checksum.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bpkg/checksum.cxx') 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) { -- cgit v1.1