fix the issue #404

This commit is contained in:
slguan 2019-08-24 16:31:06 +08:00
parent a83cdd80d9
commit 263bab87d2
1 changed files with 4 additions and 1 deletions

View File

@ -336,13 +336,16 @@ bool taosGetDisk() {
}
if (statvfs(logDir, &info)) {
tsTotalLogDirGB = 0;
tsAvailLogDirGB = 0;
return false;
} else { tsTotalLogDirGB = (float)((double)info.f_blocks * (double)info.f_frsize / unit);
} else {
tsTotalLogDirGB = (float)((double)info.f_blocks * (double)info.f_frsize / unit);
tsAvailLogDirGB = (float)((double)info.f_bavail * (double)info.f_frsize / unit);
}
if (statvfs("/tmp", &info)) {
tsTotalTmpDirGB = 0;
tsAvailTmpDirGB = 0;
return false;
} else {