Quote:
Originally Posted by timlegge
The path separator issue affected most of the issues. If you see any issues, it would be helpful to know which OS and what the calibre display showed the path to be for the file.
Tim
|
Tim,
The path separator issue has bitten me more than once.
The 'rules' are:
- lpath must always be the path from the mount point, and must always be forward slashed. It must not have a leading slash.
- path must be the complete path, and must always use os.sep.
- prefix must be the path to the root of the storage, and must use os.sep. It must have a trailing os.sep.
If you carefully follow these rules, then all the various bits of software will know what to do when constructing and manipulating paths.
You might not have noticed a new classfunction added to USBMS.driver, normalize_paths. It takes a constructed path (for example, os.path.join(prefix, lpath)) and returns that path corrected for the local OS and validated to be unicode. The base driver uses that function liberally.