mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-28 12:30:00 +00:00
Fix for #286
This commit is contained in:
parent
cf5e2f7cd1
commit
193605df4a
@ -278,7 +278,7 @@ def get_valid_filename(value, replace_whitespace=True):
|
|||||||
else:
|
else:
|
||||||
value = unicode(re_slugify.sub('', value).strip())
|
value = unicode(re_slugify.sub('', value).strip())
|
||||||
if replace_whitespace:
|
if replace_whitespace:
|
||||||
#*+:\"/<>? werden durch _ ersetzt
|
#*+:\"/<>? are replaced by _
|
||||||
value = re.sub('[\*\+:\\\"/<>\?]+', u'_', value, flags=re.U)
|
value = re.sub('[\*\+:\\\"/<>\?]+', u'_', value, flags=re.U)
|
||||||
|
|
||||||
value = value[:128]
|
value = value[:128]
|
||||||
|
@ -2994,8 +2994,8 @@ def upload():
|
|||||||
tags = meta.tags
|
tags = meta.tags
|
||||||
series = meta.series
|
series = meta.series
|
||||||
series_index = meta.series_id
|
series_index = meta.series_id
|
||||||
title_dir = helper.get_valid_filename(title, False)
|
title_dir = helper.get_valid_filename(title)
|
||||||
author_dir = helper.get_valid_filename(author, False)
|
author_dir = helper.get_valid_filename(author)
|
||||||
data_name = title_dir
|
data_name = title_dir
|
||||||
filepath = config.config_calibre_dir + os.sep + author_dir + os.sep + title_dir
|
filepath = config.config_calibre_dir + os.sep + author_dir + os.sep + title_dir
|
||||||
saved_filename = filepath + os.sep + data_name + meta.extension.lower()
|
saved_filename = filepath + os.sep + data_name + meta.extension.lower()
|
||||||
|
Loading…
Reference in New Issue
Block a user