From 886b47188a589968f5c566ec20d560554105a704 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 12 Aug 2019 17:01:27 +0200 Subject: Fix fdstream usage --- bdep/new.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bdep/new.cxx b/bdep/new.cxx index f9a3c82..1aebc57 100644 --- a/bdep/new.cxx +++ b/bdep/new.cxx @@ -714,7 +714,9 @@ namespace bdep { try { - os.open (f, fdopen_mode::create | fdopen_mode::exclusive); + os.open (f, (fdopen_mode::out | + fdopen_mode::create | + fdopen_mode::exclusive)); cf = f; rms.push_back (auto_rmfile (move (f))); } @@ -1980,7 +1982,9 @@ namespace bdep bool e (exists (f)); try { - ofdstream os (f, fdopen_mode::create | fdopen_mode::append); + ofdstream os (f, (fdopen_mode::out | + fdopen_mode::create | + fdopen_mode::append)); os << (e ? ":" : ": 1") << endl << "location: " << pkg->posix_representation () << endl; os.close (); -- cgit v1.1