mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 23:27:44 +01:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
fb178cbdd1
1 changed files with 5 additions and 1 deletions
|
|
@ -422,8 +422,9 @@ def _create_upload_path(self, mdata, fname, create_dirs=True):
|
|||
except:
|
||||
pass
|
||||
|
||||
dotless_ext = ext[1:] if len(ext) > 0 else ext
|
||||
maxlen = (self.MAX_PATH_LEN - (self.PATH_FUDGE_FACTOR +
|
||||
self.exts_path_lengths.get(ext, self.PATH_FUDGE_FACTOR)))
|
||||
self.exts_path_lengths.get(dotless_ext, self.PATH_FUDGE_FACTOR)))
|
||||
|
||||
special_tag = None
|
||||
if mdata.tags:
|
||||
|
|
@ -491,6 +492,9 @@ def remove_trailing_periods(x):
|
|||
extra_components = list(map(remove_trailing_periods, extra_components))
|
||||
components = shorten_components_to(maxlen, extra_components)
|
||||
filepath = posixpath.join(*components)
|
||||
self._debug('lengths', dotless_ext, maxlen,
|
||||
self.exts_path_lengths.get(dotless_ext, self.PATH_FUDGE_FACTOR),
|
||||
len(filepath))
|
||||
return filepath
|
||||
|
||||
def _strip_prefix(self, path):
|
||||
|
|
|
|||
Loading…
Reference in a new issue