mirror of
				https://github.com/nadoo/glider.git
				synced 2025-11-04 15:52:38 +08:00 
			
		
		
		
	Absolute path support for rules-dir config
This commit is contained in:
		
							parent
							
								
									21923af1cd
								
							
						
					
					
						commit
						3939c01467
					
				
							
								
								
									
										4
									
								
								conf.go
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								conf.go
									
									
									
									
									
								
							@ -71,7 +71,9 @@ func confInit() {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if conf.RulesDir != "" {
 | 
						if conf.RulesDir != "" {
 | 
				
			||||||
		conf.RulesDir = path.Join(flag.ConfDir(), conf.RulesDir)
 | 
					                if !path.IsAbs(conf.RulesDir) {
 | 
				
			||||||
 | 
					                        conf.RulesDir = path.Join(flag.ConfDir(), conf.RulesDir)
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
		ruleFolderFiles, _ := listDir(conf.RulesDir, ".rule")
 | 
							ruleFolderFiles, _ := listDir(conf.RulesDir, ".rule")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		for _, ruleFile := range ruleFolderFiles {
 | 
							for _, ruleFile := range ruleFolderFiles {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user