diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-12 17:01:27 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-12 17:01:27 +0200 |
commit | 886b47188a589968f5c566ec20d560554105a704 (patch) | |
tree | d17b63a3859fe4019df6f54c384b4f4dfb5f00bf | |
parent | 67097bb095819072579994595a2e2cb6e0cd9600 (diff) |
Fix fdstream usage
-rw-r--r-- | bdep/new.cxx | 8 |
1 files 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 (); |