diff options
| -rw-r--r-- | src/file.cpp | 2 | ||||
| -rw-r--r-- | src/tests/taf.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
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 ) } | |||
| 18 | Bu::File::File( const Bu::FString &sName, int iFlags ) : | 18 | Bu::File::File( const Bu::FString &sName, int iFlags ) : |
| 19 | fd( -1 ) | 19 | fd( -1 ) |
| 20 | { | 20 | { |
| 21 | fd = ::open( sName.getStr(), getPosixFlags( iFlags ) ); | 21 | fd = ::open( sName.getStr(), getPosixFlags( iFlags ), 0666 ); |
| 22 | if( fd < 0 ) | 22 | if( fd < 0 ) |
| 23 | { | 23 | { |
| 24 | throw Bu::FileException( errno, "%s: %s", | 24 | 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[] ) | |||
| 19 | Bu::TafGroup *pGroup = tr.readGroup(); | 19 | Bu::TafGroup *pGroup = tr.readGroup(); |
| 20 | 20 | ||
| 21 | { | 21 | { |
| 22 | Bu::File fo("out.taf", Bu::File::Write ); | 22 | Bu::File fo("out.taf", Bu::File::Write|Bu::File::Create ); |
| 23 | Bu::TafWriter tw( fo ); | 23 | Bu::TafWriter tw( fo ); |
| 24 | tw.writeGroup( pGroup ); | 24 | tw.writeGroup( pGroup ); |
| 25 | } | 25 | } |
| @@ -34,7 +34,7 @@ int main( int argc, char *argv[] ) | |||
| 34 | Bu::TafGroup *pGroup = tr.readGroup(); | 34 | Bu::TafGroup *pGroup = tr.readGroup(); |
| 35 | 35 | ||
| 36 | { | 36 | { |
| 37 | Bu::File fo( argv[2], Bu::File::Write ); | 37 | Bu::File fo( argv[2], Bu::File::Write|Bu::File::Create ); |
| 38 | Bu::TafWriter tw( fo ); | 38 | Bu::TafWriter tw( fo ); |
| 39 | tw.writeGroup( pGroup ); | 39 | tw.writeGroup( pGroup ); |
| 40 | } | 40 | } |
