Fix incorrect 'unlink' return value check

Change-Id: I430f6bb21a5fd87e0422420463e8bb96c4a612e1
This commit is contained in:
nkk71
2017-06-13 19:49:05 +03:00
committed by Dees Troy
parent 56cf564658
commit 9efbe769c3
+1 -1
View File
@@ -2124,7 +2124,7 @@ bool TWPartition::Wipe_Data_Without_Wiping_Media_Func(const string& parent __unu
}
rmdir(dir.c_str());
} else if (de->d_type == DT_REG || de->d_type == DT_LNK || de->d_type == DT_FIFO || de->d_type == DT_SOCK) {
if (!unlink(dir.c_str()))
if (unlink(dir.c_str()) != 0)
LOGINFO("Unable to unlink '%s': %s\n", dir.c_str(), strerror(errno));
}
}