diff --git a/dedupfs/dedupfs.py b/dedupfs/dedupfs.py index 4344fbc..b491930 100644 --- a/dedupfs/dedupfs.py +++ b/dedupfs/dedupfs.py @@ -828,6 +828,8 @@ class DedupFS(fuse.Fuse): # {{{1 with open(FIFO_PIPE, 'wb') as pipe: os.unlink(FIFO_PIPE) pipe.write(self.compress(new_block)) + # if callable(getattr(pipe, 'flush', None)): + # pipe.flush() process.wait() # self.blocks[digest] = self.compress(new_block) diff --git a/telegram_client_x.py b/telegram_client_x.py index bb5c526..9acf56b 100644 --- a/telegram_client_x.py +++ b/telegram_client_x.py @@ -375,8 +375,8 @@ class TelegramClientX(TelegramClient): cdn_decrypter, result = CdnDecrypter.prepare_decrypter(client, self._get_cdn_client(result), result) else: f.write(result.bytes) - if callable(getattr(f, 'flush', None)): - f.flush() + # if callable(getattr(f, 'flush', None)): + # f.flush() offset += part_size except FileMigrateError as e: __log__.info('File lives in another DC') @@ -412,8 +412,8 @@ class TelegramClientX(TelegramClient): for th in download_thread: if th.result and th.result.bytes: f.write(th.result.bytes) - if callable(getattr(f, 'flush', None)): - f.flush() + # if callable(getattr(f, 'flush', None)): + # f.flush() if progress_callback: progress_callback(f.tell(), file_size) else: