View Single Post
Old 11-08-2020, 06:43 AM   #15
yorikk
Member
yorikk began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Nov 2020
Device: amazon kindle
Finally, found way to keep fsync and solve the problem:

1) /usr/lib/calibre/calibre/__init__.py

just added after os.utime:

os.system("sync")

2) /usr/lib/calibre/calibre/utils/filenames.py (yeah, there is os.fsync but no utime...)

added after os.fsync (but need more pretty code):

os.utime(os.path.join(cpath, fname), None)
os.system("sync")

My Kindle + Calibre is alive again !
yorikk is offline   Reply With Quote