Commit 49dce6ec by Stéphane Graber

Merge pull request #768 from clopez/ignore_git_directories

Ignore any container named '.git'
parents 5c698360 e4ebeab1
...@@ -4188,9 +4188,9 @@ int list_defined_containers(const char *lxcpath, char ***names, struct lxc_conta ...@@ -4188,9 +4188,9 @@ int list_defined_containers(const char *lxcpath, char ***names, struct lxc_conta
while (!readdir_r(dir, &dirent, &direntp)) { while (!readdir_r(dir, &dirent, &direntp)) {
if (!direntp) if (!direntp)
break; break;
if (!strcmp(direntp->d_name, "."))
continue; // Ignore '.', '..' and any hidden directory
if (!strcmp(direntp->d_name, "..")) if (!strncmp(direntp->d_name, ".", 1))
continue; continue;
if (!config_file_exists(lxcpath, direntp->d_name)) if (!config_file_exists(lxcpath, direntp->d_name))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment