go.tools/dashboard/builder: try to recreate workpath if already exists
Fixes golang/go#8714. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/148010043
This commit is contained in:
		
							parent
							
								
									e06c202657
								
							
						
					
					
						commit
						9cde9bdbd1
					
				| 
						 | 
					@ -417,7 +417,12 @@ func (b *Builder) buildHash(hash string) error {
 | 
				
			||||||
	// create place in which to do work
 | 
						// create place in which to do work
 | 
				
			||||||
	workpath := filepath.Join(*buildroot, b.name+"-"+hash[:12])
 | 
						workpath := filepath.Join(*buildroot, b.name+"-"+hash[:12])
 | 
				
			||||||
	if err := os.Mkdir(workpath, mkdirPerm); err != nil {
 | 
						if err := os.Mkdir(workpath, mkdirPerm); err != nil {
 | 
				
			||||||
		return err
 | 
							if err2 := removePath(workpath); err2 != nil {
 | 
				
			||||||
 | 
								return err
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if err := os.Mkdir(workpath, mkdirPerm); err != nil {
 | 
				
			||||||
 | 
								return err
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	defer removePath(workpath)
 | 
						defer removePath(workpath)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue