am 4bc35daa
: Check "." and ".." to delete all files in a dir.
* commit '4bc35daaa2ebfb099b2f912ca67e77bd8e98fbb7': Check "." and ".." to delete all files in a dir.
This commit is contained in:
commit
b42a47f7a6
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue