mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Merge pull request #1385 from lbonn/sec-no-hidden
Security config: skip hidden files
This commit is contained in:
		
						commit
						97daffea58
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -550,9 +550,12 @@ bool load_main_config(const char *file, bool is_active) {
 | 
			
		|||
			strcpy(_path, base);
 | 
			
		||||
			strcat(_path, ent->d_name);
 | 
			
		||||
			lstat(_path, &s);
 | 
			
		||||
			if (S_ISREG(s.st_mode)) {
 | 
			
		||||
			if (S_ISREG(s.st_mode) && ent->d_name[0] != '.') {
 | 
			
		||||
				list_add(secconfigs, _path);
 | 
			
		||||
			}
 | 
			
		||||
			else {
 | 
			
		||||
				free(_path);
 | 
			
		||||
			}
 | 
			
		||||
			ent = readdir(dir);
 | 
			
		||||
		}
 | 
			
		||||
		closedir(dir);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue