RestoreSink: Slightly reduce the number of concurrent FDs
This commit is contained in:
		
							parent
							
								
									d5529f5b85
								
							
						
					
					
						commit
						f53574ebd6
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -282,6 +282,7 @@ struct RestoreSink : ParseSink
 | 
			
		|||
    void createRegularFile(const Path & path)
 | 
			
		||||
    {
 | 
			
		||||
        Path p = dstPath + path;
 | 
			
		||||
        fd.close();
 | 
			
		||||
        fd = open(p.c_str(), O_CREAT | O_EXCL | O_WRONLY, 0666);
 | 
			
		||||
        if (fd == -1) throw SysError(format("creating file `%1%'") % p);
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue