aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-10-06 12:42:38 -0400
committerLibravatar GitHub <noreply@github.com>2017-10-06 12:42:38 -0400
commit97daffea58b880c9b62dde02cd2dcd3c09f362eb (patch)
tree46fdacc606985064c4176e63c688e62621852588
parentMerge pull request #1384 from lbonn/move-workspace-fullname (diff)
parentSecurity config: skip hidden files (diff)
downloadsway-97daffea58b880c9b62dde02cd2dcd3c09f362eb.tar.gz
sway-97daffea58b880c9b62dde02cd2dcd3c09f362eb.tar.zst
sway-97daffea58b880c9b62dde02cd2dcd3c09f362eb.zip
Merge pull request #1385 from lbonn/sec-no-hidden
Security config: skip hidden files
-rw-r--r--sway/config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c
index 4cb080ab..5b2b6569 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -550,9 +550,12 @@ bool load_main_config(const char *file, bool is_active) {
550 strcpy(_path, base); 550 strcpy(_path, base);
551 strcat(_path, ent->d_name); 551 strcat(_path, ent->d_name);
552 lstat(_path, &s); 552 lstat(_path, &s);
553 if (S_ISREG(s.st_mode)) { 553 if (S_ISREG(s.st_mode) && ent->d_name[0] != '.') {
554 list_add(secconfigs, _path); 554 list_add(secconfigs, _path);
555 } 555 }
556 else {
557 free(_path);
558 }
556 ent = readdir(dir); 559 ent = readdir(dir);
557 } 560 }
558 closedir(dir); 561 closedir(dir);