mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 00:03:31 +00:00
Merge pull request #768 from clopez/ignore_git_directories
Ignore any container named '.git'
This commit is contained in:
commit
49dce6ec63
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user