From 5b1941a8330efb681eefd6ec85df13e55d6bc48b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 29 Jun 2019 10:23:34 +0530 Subject: [PATCH] ... --- src/calibre/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/__init__.py b/src/calibre/__init__.py index 007a92777e..28c90795fe 100644 --- a/src/calibre/__init__.py +++ b/src/calibre/__init__.py @@ -670,6 +670,9 @@ def fsync(fileobj): # harmless filesystem activity, and who cares about performance. # See https://bugs.launchpad.net/calibre/+bug/1834641 # and https://bugzilla.kernel.org/show_bug.cgi?id=203973 + # To check for the existence of the bug, simply run: + # python -c "p = '/run/media/kovid/Kindle/driveinfo.calibre'; f = open(p, 'r+b'); os.fsync(f.fileno());" + # this will cause the Kindle to disconnect. with open(fileobj.name + '.linux-sucks', 'wb') as f: f.write(b'I cannot believe I need to do this') os.remove(f.name)