mirror of
				https://github.com/taigrr/go-selfupdate
				synced 2025-01-18 04:33:12 -08:00 
			
		
		
		
	Return error if failed to make directory while "BackgroundRun"
This commit is contained in:
		
							parent
							
								
									e7050deb55
								
							
						
					
					
						commit
						13e6463ac5
					
				| @ -98,7 +98,10 @@ func (u *Updater) getExecRelativeDir(dir string) string { | ||||
| 
 | ||||
| // BackgroundRun starts the update check and apply cycle. | ||||
| func (u *Updater) BackgroundRun() error { | ||||
| 	os.MkdirAll(u.getExecRelativeDir(u.Dir), 0777) | ||||
| 	if err := os.MkdirAll(u.getExecRelativeDir(u.Dir), 0777); err != nil { | ||||
| 		// fail | ||||
| 		return err | ||||
| 	} | ||||
| 	if u.wantUpdate() { | ||||
| 		if err := up.CanUpdate(); err != nil { | ||||
| 			// fail | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user