forked from OSchip/llvm-project
				
			Fixes problem when calling llvm-ar from an unmodifiable directory.
This fixes a regression introduced by r185726: the new call to get a unique file does not prepend the system temporary directory, so we need to anchor on the file that the temporary file gets moved to to ensure we're on the same file system. llvm-svn: 185825
This commit is contained in:
		
							parent
							
								
									12493bb7d5
								
							
						
					
					
						commit
						c9b82d76e2
					
				| 
						 | 
				
			
			@ -260,8 +260,8 @@ bool Archive::writeToDisk(bool TruncateNames, std::string *ErrMsg) {
 | 
			
		|||
  // Create a temporary file to store the archive in
 | 
			
		||||
  int TmpArchiveFD;
 | 
			
		||||
  SmallString<128> TmpArchive;
 | 
			
		||||
  error_code EC = sys::fs::createUniqueFile("temp-archive-%%%%%%%.a",
 | 
			
		||||
                                            TmpArchiveFD, TmpArchive);
 | 
			
		||||
  error_code EC = sys::fs::createUniqueFile(
 | 
			
		||||
      archPath + ".temp-archive-%%%%%%%.a", TmpArchiveFD, TmpArchive);
 | 
			
		||||
  if (EC)
 | 
			
		||||
    return true;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue