From 1d9f410810de6fbb9c974735e5e14dbebe1c0718 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 22 Jul 2016 12:43:22 +0300 Subject: Adapt to fdstream extension --- bpkg/archive.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bpkg/archive.cxx') diff --git a/bpkg/archive.cxx b/bpkg/archive.cxx index 0edf09d..f0596bf 100644 --- a/bpkg/archive.cxx +++ b/bpkg/archive.cxx @@ -93,15 +93,14 @@ namespace bpkg try { - ifdstream is (pr.in_ofd); - // Do not throw when eofbit is set (end of stream reached), and // when failbit is set (getline() failed to extract any character). // - is.exceptions (ifdstream::badbit); + ifdstream is (pr.in_ofd, ifdstream::badbit); string s; getline (is, s, '\0'); + is.close (); if (pr.wait ()) return s; @@ -113,7 +112,7 @@ namespace bpkg // Child exit status doesn't matter. Just wait for the process // completion and fall through. // - pr.wait (); + pr.wait (); // Check throw. } // While it is reasonable to assuming the child process issued diagnostics -- cgit v1.1