|
|
@ -1618,7 +1618,7 @@ static bool isRunning(const TQCString &fName, bool printNetworkId = false)
|
|
|
|
if (::access(fName.data(), R_OK) == 0) {
|
|
|
|
if (::access(fName.data(), R_OK) == 0) {
|
|
|
|
TQFile f(fName);
|
|
|
|
TQFile f(fName);
|
|
|
|
f.open(IO_ReadOnly);
|
|
|
|
f.open(IO_ReadOnly);
|
|
|
|
int size = TQMIN( (qint64)1024, f.size() ); // protection against a huge file
|
|
|
|
int size = TQMIN( (long)1024, f.size() ); // protection against a huge file
|
|
|
|
TQCString contents( size+1 );
|
|
|
|
TQCString contents( size+1 );
|
|
|
|
bool ok = f.readBlock( contents.data(), size ) == size;
|
|
|
|
bool ok = f.readBlock( contents.data(), size ) == size;
|
|
|
|
contents[size] = '\0';
|
|
|
|
contents[size] = '\0';
|
|
|
|