commit | 9efbe769c364103a58ba679fe96eb6e3210c3b01 | [log] [tgz] |
---|---|---|
author | nkk71 <nkk71x@gmail.com> | Tue Jun 13 19:49:05 2017 +0300 |
committer | Dees Troy <dees_troy@teamw.in> | Sat Jun 17 14:21:47 2017 +0200 |
tree | 5b4265ad52b6b265b9505c9f57355a470a017d19 | |
parent | 56cf56465857e79e814b1e2d50f13e176170fcb3 [diff] |
Fix incorrect 'unlink' return value check Change-Id: I430f6bb21a5fd87e0422420463e8bb96c4a612e1
diff --git a/partition.cpp b/partition.cpp index 1f57a53..543e867 100644 --- a/partition.cpp +++ b/partition.cpp
@@ -2124,7 +2124,7 @@ } 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)); } }