mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 07:04:12 +00:00 
			
		
		
		
	#N/A: Fix mmap log cleanup
This commit is contained in:
		| @@ -16,9 +16,11 @@ def _read(f, fd): | |||||||
|     try: |     try: | ||||||
|         f.write(data) |         f.write(data) | ||||||
|     except ValueError: |     except ValueError: | ||||||
|         f.move(0, const.LOG_SIZE_TO_CLEAN, |         position = const.LOG_SIZE_IN_BYTES - const.LOG_SIZE_TO_CLEAN | ||||||
|                const.LOG_SIZE_IN_BYTES - const.LOG_SIZE_TO_CLEAN) |         f.move(0, const.LOG_SIZE_TO_CLEAN, position) | ||||||
|         f.seek(const.LOG_SIZE_IN_BYTES - const.LOG_SIZE_TO_CLEAN) |         f.seek(position) | ||||||
|  |         f.write(b'\x00' * const.LOG_SIZE_TO_CLEAN) | ||||||
|  |         f.seek(position) | ||||||
|     return data |     return data | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user