View Single Post
Old 05-28-2010, 03:13 AM   #34
q345
Member
q345 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: May 2010
Device: none
Small suggestion - os.path.ismount to test if Calibre Directory is mountpoint

I've never learned/used Python, but I played a little bit with interpreter today
and found out that method os.path.ismount(directory_name) return True if directory is mount point.

May be it's make sense to test the new library location for "mountpoitness" if user try to change it in Preferences and issue a warning :

"The new library location is a mountpoint !
Please, check if it supports file locking"

Should take just a few lines of code

Same test should be done when Calibre is started, since when I tried to "cheat" by converting Calibre Library directory to mountpoint when Calibre was not running, results were disastrous.

Last edited by q345; 05-28-2010 at 03:27 AM.
q345 is offline   Reply With Quote