From 609724c65b16747d3c4ea496eb9ed9a5e4fbcbc2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 31 Oct 2012 08:14:34 +0530 Subject: [PATCH] ... --- manual/faq.rst | 21 +++++++++++++++++++++ src/calibre/utils/fonts/scanner.py | 9 +++++++++ 2 files changed, 30 insertions(+) diff --git a/manual/faq.rst b/manual/faq.rst index d7d6367f69..d46011d8d8 100644 --- a/manual/faq.rst +++ b/manual/faq.rst @@ -557,6 +557,27 @@ There can be two reasons why |app| is showing a empty list of books: * Your metadata.db file was deleted/corrupted. In this case, you can ask |app| to rebuild the metadata.db from its backups. Right click the |app| icon in the |app| toolbar (it will say 0 books underneath it) and select Library maintenance->Restore database. |app| will automatically rebuild metadata.db. +I am getting errors with my calibre library on a networked drive/NAS? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Do not put your calibre library on a networked drive**. + +A filesystem is a complex beast. Most network filesystems lack various +filesystem features that |app| uses. Some dont support file locking, some dont +support hardlinking, some are just flaky. Additionally, |app| is a single user +application, if you accidentally run two copies of |app| on the same networked +library, bad things will happen. Finally, different OSes impose different +limitations on filesystems, so if you share your networked drive across OSes, +once again, bad things *will happen*. + +Consider using the |app| Content Server to make your books available on other +computers. Run |app| on a single computer and access it via the Content Server +or a Remote Desktop solution. + +If you must share the actual library, use a file syncing tool like +DropBox or rsync or Microsoft SkyDrive instead of a networked drive. Even with +these tools there is danger of data corruption/loss, so only do this if you are +willing to live with that risk. Content From The Web --------------------- diff --git a/src/calibre/utils/fonts/scanner.py b/src/calibre/utils/fonts/scanner.py index f3bfd027cf..ade0b41d8b 100644 --- a/src/calibre/utils/fonts/scanner.py +++ b/src/calibre/utils/fonts/scanner.py @@ -271,6 +271,10 @@ class Scanner(Thread): self.cache['version'] = self.CACHE_VERSION self.cache['fonts'] = self.cached_fonts + def force_rescan(self): + self.cached_fonts = {} + self.write_cache() + def read_font_metadata(self, path, fileid): with lopen(path, 'rb') as f: try: @@ -301,6 +305,11 @@ class Scanner(Thread): font_scanner = Scanner() font_scanner.start() +def force_rescan(): + font_scanner.join() + font_scanner.force_rescan() + font_scanner.run() + if __name__ == '__main__': font_scanner.dump_fonts()