Skip to content
Snippets Groups Projects
Commit 4bc35daa authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi
Browse files

Check "." and ".." to delete all files in a dir.

Bug: 13421999
Change-Id: I9d0f65cfc9a0f18c7affc152a5b54f9970048e9c
parent 5dc17c22
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,9 @@ namespace latinime {
if (dirent->d_type == DT_DIR) {
continue;
}
if (strcmp(dirent->d_name, ".") == 0 || strcmp(dirent->d_name, "..") == 0) {
continue;
}
const int filePathBufSize = getFilePathBufSize(dirPath, dirent->d_name);
char filePath[filePathBufSize];
getFilePath(dirPath, dirent->d_name, filePathBufSize, filePath);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment