remove management directories in node
This commit is contained in:
parent
a78f2270ae
commit
5eb64025f9
|
@ -66,9 +66,14 @@ void remove_realm_files_from_directory(const std::string &dir_path)
|
|||
while (struct dirent *entry = readdir(dir)) {
|
||||
if (strstr(entry->d_name, ".realm")) {
|
||||
// Intentionally not complaining if there was an error.
|
||||
if (entry->d_type == DT_DIR) {
|
||||
rmdir(entry->d_name);
|
||||
}
|
||||
else {
|
||||
unlink(entry->d_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir(dir);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue