mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Shrink log-file cleverly.
This commit is contained in:
@@ -180,6 +180,7 @@ setupLogfile()
|
||||
{
|
||||
QFile f( logFile().toLocal8Bit() );
|
||||
f.open( QIODevice::ReadOnly | QIODevice::Text );
|
||||
f.seek( f.size() - ( LOGFILE_SIZE - ( LOGFILE_SIZE / 4 ) ) );
|
||||
lc = f.readAll();
|
||||
f.close();
|
||||
}
|
||||
@@ -189,7 +190,7 @@ setupLogfile()
|
||||
{
|
||||
QFile f( logFile().toLocal8Bit() );
|
||||
f.open( QIODevice::WriteOnly | QIODevice::Text );
|
||||
f.write( lc.right( LOGFILE_SIZE - ( LOGFILE_SIZE / 4 ) ) );
|
||||
f.write( lc );
|
||||
f.close();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user