1
0
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:
Christian Muehlhaeuser 2014-08-28 18:36:10 +02:00
parent a74e442bb5
commit c41f634e8e

View File

@ -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();
}
}