diff --git a/src/LogCompressor.cc b/src/LogCompressor.cc index 094199a4f7c066a969f9d9daef4de7d47f763f9c..0a36b2e0be5fb50bc8ee572c0f35c9260bac5f57 100644 --- a/src/LogCompressor.cc +++ b/src/LogCompressor.cc @@ -61,8 +61,8 @@ void LogCompressor::run() } // Verify that the output file is useable - QTemporaryFile outTmpFile; - if (!outTmpFile.open()) { + QFile outTmpFile("processed_" + outFileName); + if (!outTmpFile.open(QIODevice::WriteOnly | QIODevice::Text)) { emit logProcessingStatusChanged(tr("Log Compressor: Cannot start/compress log file, since output file %1 is not writable").arg(QFileInfo(outTmpFile.fileName()).absoluteFilePath())); return; } @@ -143,9 +143,9 @@ void LogCompressor::run() infile.close(); // Make sure we remove the source file before replacing it. - QFile::remove(outFileName); - outTmpFile.copy(outFileName); - outTmpFile.close(); +// QFile::remove(outFileName); +// outTmpFile.copy(outFileName); +// outTmpFile.close(); emit logProcessingStatusChanged(tr("Log Compressor: Writing output to file %1").arg(QFileInfo(outFileName).absoluteFilePath())); // Clean up and update the status before we return.