mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
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
@ -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…
x
Reference in New Issue
Block a user