From 3d18446acef5462e946fe79909b198b35c2bbfa0 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 29 May 2016 01:23:34 +0300 Subject: Port to MinGW --- bpkg/rep-create.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bpkg/rep-create.cxx') 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); -- cgit v1.1