Utils: add IsDotOrDotDot() and use it in the appropriate places
Change-Id: I704522b26acfb3e7c423d9a14d69ede513b50482
diff --git a/MoveStorage.cpp b/MoveStorage.cpp
index 2447cce..3f636a2 100644
--- a/MoveStorage.cpp
+++ b/MoveStorage.cpp
@@ -70,9 +70,7 @@
bool found = false;
struct dirent* ent;
while ((ent = readdir(dirp.get())) != NULL) {
- if ((!strcmp(ent->d_name, ".")) || (!strcmp(ent->d_name, ".."))) {
- continue;
- }
+ if (IsDotOrDotDot(*ent)) continue;
auto subdir = path + "/" + ent->d_name;
found |= pushBackContents(subdir, cmd, searchLevels - 1);
}