aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-create.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-05-29 01:23:34 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-05-31 19:14:39 +0300
commit3d18446acef5462e946fe79909b198b35c2bbfa0 (patch)
treeeb60dab710569543bb8dd314e63eda745a4c166c /bpkg/rep-create.cxx
parent45e82ae43be6444b0260daaf08eeb084eddbdb34 (diff)
Port to MinGW
Diffstat (limited to 'bpkg/rep-create.cxx')
-rw-r--r--bpkg/rep-create.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/bpkg/rep-create.cxx b/bpkg/rep-create.cxx
index 2ab52fb..61e3f81 100644
--- a/bpkg/rep-create.cxx
+++ b/bpkg/rep-create.cxx
@@ -219,7 +219,12 @@ namespace bpkg
{
ofstream ofs;
ofs.exceptions (ofstream::badbit | ofstream::failbit);
- ofs.open (p.string ());
+
+ // While we can do nothing about repositories files edited on Windows
+ // and littered with the carriage return characters, there is no
+ // reason to litter the auto-generated packages and signature files.
+ //
+ ofs.open (p.string (), ofstream::out | ofstream::binary);
manifest_serializer s (ofs, p.string ());
manifests.serialize (s);
@@ -242,7 +247,7 @@ namespace bpkg
ofstream ofs;
ofs.exceptions (ofstream::badbit | ofstream::failbit);
- ofs.open (p.string ());
+ ofs.open (p.string (), ofstream::out | ofstream::binary);
manifest_serializer s (ofs, p.string ());
m.serialize (s);