mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-19 23:41:51 +02:00
* Shrink log-file cleverly.
This commit is contained in:
parent
a74e442bb5
commit
c41f634e8e
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user