diff options
-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 (); |