Fix reading symlinks
The st_size field of a symlink doesn't have to be correct, e.g. for /dev/fd symlinks.
This commit is contained in:
		
							parent
							
								
									d0344dd2c1
								
							
						
					
					
						commit
						012f8d187c
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -209,7 +209,7 @@ Path readLink(const Path & path) | ||||||
|     else if (rlsize > st.st_size) |     else if (rlsize > st.st_size) | ||||||
|         throw Error(format("symbolic link ‘%1%’ size overflow %2% > %3%") |         throw Error(format("symbolic link ‘%1%’ size overflow %2% > %3%") | ||||||
|             % path % rlsize % st.st_size); |             % path % rlsize % st.st_size); | ||||||
|     return string(buf, st.st_size); |     return string(buf, rlsize); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue