mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
Fix error on Windows
This commit is contained in:
parent
df0c0d4d35
commit
f2a926aecf
1 changed files with 3 additions and 1 deletions
|
@ -64,7 +64,9 @@ class TextExporter:
|
||||||
except OSError as oserr:
|
except OSError as oserr:
|
||||||
title_length = len(str(entry.title))
|
title_length = len(str(entry.title))
|
||||||
if (
|
if (
|
||||||
oserr.errno == errno.ENAMETOOLONG or oserr.errno == errno.ENOENT
|
oserr.errno == errno.ENAMETOOLONG
|
||||||
|
or oserr.errno == errno.ENOENT
|
||||||
|
or oserr.errno == errno.EINVAL
|
||||||
) and title_length > 1:
|
) and title_length > 1:
|
||||||
shorter_file_length = title_length // 2
|
shorter_file_length = title_length // 2
|
||||||
entry.title = str(entry.title)[:shorter_file_length]
|
entry.title = str(entry.title)[:shorter_file_length]
|
||||||
|
|
Loading…
Add table
Reference in a new issue