aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2008-10-02 21:25:54 +0000
committerMike Buland <eichlan@xagasoft.com>2008-10-02 21:25:54 +0000
commit27a11c4e152ba767388ab790a124b6da00d4fc7f (patch)
treea95ddc0acfc9119d19549ca0cc4366deee39f528
parent79ee32aa24e31d5bb786d0c162ad8145cc7c1f35 (diff)
downloadlibbu++-27a11c4e152ba767388ab790a124b6da00d4fc7f.tar.gz
libbu++-27a11c4e152ba767388ab790a124b6da00d4fc7f.tar.bz2
libbu++-27a11c4e152ba767388ab790a124b6da00d4fc7f.tar.xz
libbu++-27a11c4e152ba767388ab790a124b6da00d4fc7f.zip
Ok...now Bu::File doesn't set stupid permissions when it creates a new file...
Diffstat (limited to '')
-rw-r--r--src/file.cpp2
-rw-r--r--src/tests/taf.cpp4
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 ) }
18Bu::File::File( const Bu::FString &sName, int iFlags ) : 18Bu::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 }