syncqt: Add the missing is_open check to writeIfDifferent
Pick-to: 6.5 6.6 Change-Id: I2a969483d20f250083c1a262bd3bfc696a7f0df4 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
This commit is contained in:
parent
e9ca247479
commit
a86fb92d4b
@ -1780,6 +1780,10 @@ bool SyncScanner::writeIfDifferent(const std::string &outputFile, const std::str
|
||||
memset(rdBuffer, 0, bufferSize);
|
||||
|
||||
std::ifstream ifs(outputFile, std::fstream::in);
|
||||
if (!ifs.is_open()) {
|
||||
std::cerr << "Unable to open " << outputFile << " for comparison." << std::endl;
|
||||
return false;
|
||||
}
|
||||
std::streamsize currentPos = 0;
|
||||
|
||||
std::size_t bytesRead = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user