Fix #2581 (Fixed "[Errno 36] File name too long" error during eBook registration)

This commit is contained in:
Kovid Goyal 2024-12-19 22:28:09 +05:30
parent 8516ace0d1
commit aaac047c0e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -154,7 +154,7 @@ def format_group(db, notify_changes, is_remote, args):
if is_remote: if is_remote:
paths = [] paths = []
for name, data in formats: for name, data in formats:
with open(os.path.join(tdir, os.path.basename(name)), 'wb') as f: with open(os.path.join(tdir, os.path.basename(name.replace('\\', os.sep))), 'wb') as f:
f.write(data) f.write(data)
paths.append(f.name) paths.append(f.name)
else: else: