* In the garbage collector, don't count files with a link count > 1 in
the "bytes/blocks freed" statistics.
This commit is contained in:
		
							parent
							
								
									f9e766db98
								
							
						
					
					
						commit
						8022015552
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -297,8 +297,10 @@ static void _deletePath(const Path & path, unsigned long long & bytesFreed, | ||||||
|     if (lstat(path.c_str(), &st)) |     if (lstat(path.c_str(), &st)) | ||||||
| 	throw SysError(format("getting attributes of path `%1%'") % path); | 	throw SysError(format("getting attributes of path `%1%'") % path); | ||||||
| 
 | 
 | ||||||
|     bytesFreed += st.st_size; |     if (!S_ISDIR(st.st_mode) && st.st_nlink == 1) { | ||||||
|     blocksFreed += st.st_blocks; |         bytesFreed += st.st_size; | ||||||
|  |         blocksFreed += st.st_blocks; | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     if (S_ISDIR(st.st_mode)) { |     if (S_ISDIR(st.st_mode)) { | ||||||
| 	Strings names = readDirectory(path); | 	Strings names = readDirectory(path); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue