Merge pull request #16 from QuasarApp/v1_1

fix worning
This commit is contained in:
Andrei Yankovich 2019-05-10 10:04:27 +03:00 committed by GitHub
commit d28b865dd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,10 @@ bool Params::parseParams(int argc,const char *argv[]) {
params ["appPath"] = QFileInfo(buffer).absolutePath();
#else
char path[2048];
readlink("/proc/self/exe", path, 2048);
if (readlink("/proc/self/exe", path, 2048) < 0) {
qWarning() << "parseParams can't get self path!" ;
return false;
}
params ["appPath"] = QFileInfo(path).absolutePath();
#endif