summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/networksettings2/systemfile.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/systemfile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings2/systemfile.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/systemfile.cpp b/noncore/settings/networksettings2/networksettings2/systemfile.cpp
index 8deef94..1b1988e 100644
--- a/noncore/settings/networksettings2/networksettings2/systemfile.cpp
+++ b/noncore/settings/networksettings2/networksettings2/systemfile.cpp
@@ -90,34 +90,34 @@ bool SystemFile::open( void ) {
90 if( F ) { 90 if( F ) {
91 F->close(); 91 F->close();
92 delete F; 92 delete F;
93 } 93 }
94 94
95 F = new QFile( Prefix + Path + ((InAppend)?"":"bup") ); 95 F = new QFile( Prefix + Path + ((InAppend)?"":"bup") );
96 Log(( "Open systemfile %s\n", F->name().latin1() )); 96 Log(( "Open systemfile %s\n", F->name().latin1() ));
97 if( ! F->open( ((InAppend)?IO_Append : 0 ) | IO_WriteOnly ) ) { 97 if( ! F->open( ((InAppend)?IO_Append : 0 ) | IO_WriteOnly ) ) {
98 return 0; 98 return 0;
99 } 99 }
100 } else { 100 } else {
101 if( ! F ) { 101 if( ! F ) {
102 owarn << "!!!!!!!!!!!!!!!!!! " << oendl; 102 odebug << "!!!!!!!!!!!!!!!!!! " << oendl;
103 owarn << "!!!! TESTMODE !!!!" << oendl; 103 odebug << "!!!! TESTMODE !!!!" << oendl;
104 owarn << "!!!!!!!!!!!!!!!!!! " << oendl; 104 odebug << "!!!!!!!!!!!!!!!!!! " << oendl;
105 owarn << "!!!!" << oendl; 105 odebug << "!!!!" << oendl;
106 owarn << "!!!! GENERATE " << Path << oendl; 106 odebug << "!!!! GENERATE " << Path << oendl;
107 if( InAppend ) { 107 if( InAppend ) {
108 owarn << "!!!! In APPEND mode" << oendl; 108 odebug << "!!!! In APPEND mode" << oendl;
109 } 109 }
110 owarn << "!!!!" << oendl; 110 odebug << "!!!!" << oendl;
111 owarn << "!!!!!!!!!!!!!!!!!!" << oendl; 111 odebug << "!!!!!!!!!!!!!!!!!!" << oendl;
112 112
113 F = new QFile(); 113 F = new QFile();
114 F->open( IO_WriteOnly, stderr ); 114 F->open( IO_WriteOnly, stderr );
115 } 115 }
116 } 116 }
117 setDevice( F ); 117 setDevice( F );
118 return 1; 118 return 1;
119} 119}
120 120
121bool SystemFile::close( void ) { 121bool SystemFile::close( void ) {
122 if( ! F || ! F->isOpen() ) { 122 if( ! F || ! F->isOpen() ) {
123 return 1 ; 123 return 1 ;
@@ -127,25 +127,25 @@ bool SystemFile::close( void ) {
127 127
128 if( Prefix == "stderr" ) { 128 if( Prefix == "stderr" ) {
129 return 1; 129 return 1;
130 } 130 }
131 131
132 QString OldP = Prefix + Path + "bup"; 132 QString OldP = Prefix + Path + "bup";
133 133
134 F->close(); 134 F->close();
135 delete F; 135 delete F;
136 F = 0; 136 F = 0;
137 137
138 if( ! InAppend ) { 138 if( ! InAppend ) {
139 owarn << "Rename " << OldP << " to " << Path << oendl; 139 odebug << "Rename " << OldP << " to " << Path << oendl;
140 return ( rename( OldP.latin1(), Path.latin1() ) >= 0 ); 140 return ( rename( OldP.latin1(), Path.latin1() ) >= 0 );
141 } 141 }
142 return 1; 142 return 1;
143} 143}
144 144
145bool SystemFile::preSection( void ) { 145bool SystemFile::preSection( void ) {
146 if( hasPreSection ) { 146 if( hasPreSection ) {
147 QFile Fl( TemplDir + Name + "/presection" ); 147 QFile Fl( TemplDir + Name + "/presection" );
148 if( ! Fl.open( IO_ReadOnly ) ) 148 if( ! Fl.open( IO_ReadOnly ) )
149 return 0; // error 149 return 0; // error
150 // copy file to this file 150 // copy file to this file
151 F->writeBlock( Fl.readAll() ); 151 F->writeBlock( Fl.readAll() );