From 27a11c4e152ba767388ab790a124b6da00d4fc7f Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 2 Oct 2008 21:25:54 +0000 Subject: Ok...now Bu::File doesn't set stupid permissions when it creates a new file... --- src/file.cpp | 2 +- src/tests/taf.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/file.cpp b/src/file.cpp index 29d2805..a058e0f 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -18,7 +18,7 @@ namespace Bu { subExceptionDef( FileException ) } Bu::File::File( const Bu::FString &sName, int iFlags ) : fd( -1 ) { - fd = ::open( sName.getStr(), getPosixFlags( iFlags ) ); + fd = ::open( sName.getStr(), getPosixFlags( iFlags ), 0666 ); if( fd < 0 ) { throw Bu::FileException( errno, "%s: %s", diff --git a/src/tests/taf.cpp b/src/tests/taf.cpp index 859ecfc..45a6430 100644 --- a/src/tests/taf.cpp +++ b/src/tests/taf.cpp @@ -19,7 +19,7 @@ int main( int argc, char *argv[] ) Bu::TafGroup *pGroup = tr.readGroup(); { - Bu::File fo("out.taf", Bu::File::Write ); + Bu::File fo("out.taf", Bu::File::Write|Bu::File::Create ); Bu::TafWriter tw( fo ); tw.writeGroup( pGroup ); } @@ -34,7 +34,7 @@ int main( int argc, char *argv[] ) Bu::TafGroup *pGroup = tr.readGroup(); { - Bu::File fo( argv[2], Bu::File::Write ); + Bu::File fo( argv[2], Bu::File::Write|Bu::File::Create ); Bu::TafWriter tw( fo ); tw.writeGroup( pGroup ); } -- cgit v1.2.3