Check "." and ".." to delete all files in a dir.
Bug: 13421999 Change-Id: I9d0f65cfc9a0f18c7affc152a5b54f9970048e9cmain
parent
5dc17c22ca
commit
4bc35daaa2
|
@ -68,6 +68,9 @@ namespace latinime {
|
||||||
if (dirent->d_type == DT_DIR) {
|
if (dirent->d_type == DT_DIR) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (strcmp(dirent->d_name, ".") == 0 || strcmp(dirent->d_name, "..") == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const int filePathBufSize = getFilePathBufSize(dirPath, dirent->d_name);
|
const int filePathBufSize = getFilePathBufSize(dirPath, dirent->d_name);
|
||||||
char filePath[filePathBufSize];
|
char filePath[filePathBufSize];
|
||||||
getFilePath(dirPath, dirent->d_name, filePathBufSize, filePath);
|
getFilePath(dirPath, dirent->d_name, filePathBufSize, filePath);
|
||||||
|
|
Loading…
Reference in New Issue