mirror of https://github.com/Xhofe/alist
				
				
				
			🐛 Fix the temp folder is not created at the first startup
							parent
							
								
									ba99c7dc03
								
							
						
					
					
						commit
						bef3d2f88d
					
				| 
						 | 
				
			
			@ -10,6 +10,10 @@ import (
 | 
			
		|||
 | 
			
		||||
// InitConf init config
 | 
			
		||||
func InitConf() {
 | 
			
		||||
	err := os.MkdirAll("data/temp", 0700)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Fatalf("create temp dir error: %s", err.Error())
 | 
			
		||||
	}
 | 
			
		||||
	log.Infof("reading config file: %s", conf.ConfigFile)
 | 
			
		||||
	if !utils.Exists(conf.ConfigFile) {
 | 
			
		||||
		log.Infof("config file not exists, creating default config file")
 | 
			
		||||
| 
						 | 
				
			
			@ -42,8 +46,4 @@ func InitConf() {
 | 
			
		|||
	if err != nil {
 | 
			
		||||
		log.Fatalf("update config struct error: %s", err.Error())
 | 
			
		||||
	}
 | 
			
		||||
	err = os.MkdirAll("data/temp", 0700)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Fatalf("create temp dir error: %s", err.Error())
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue