mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use a less intrusive workaround for the Linux kernel bug causing Kindle disconnects
This commit is contained in:
parent
f27b3d7c28
commit
7f978f859c
@ -674,9 +674,7 @@ def fsync(fileobj):
|
||||
# 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.
|
||||
try:
|
||||
with open(fileobj.name + '.linux-sucks', 'wb') as f:
|
||||
f.write(b'I cannot believe I need to do this')
|
||||
os.remove(f.name)
|
||||
os.utime(fileobj.name, None)
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
Loading…
x
Reference in New Issue
Block a user