[Enhancement] Filename length during saving on disk

Bug #1807525 reported by Jucker on 2018-12-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

[Enhancement]
Hello. From time to time, when I have to save my books from Calibre to disk, the program writes me that the files are too big. As I can understand, it is because the filenames of the books are very long. I have thousands of ebooks and other documents in Calibre, and many of it has a very long filenames. So manually renaming the filenames is very uncomfortable.
Can you make that the program will rename the filenames itself automatically to maximally possible filename length, please?
Thank you.

P.S. Sorry for my bad English.

On what operating system is this. On windows calibre automatically
restricts file name lengths already when saving to disk.

Jucker (jucker7) wrote :

Linux Mint 19

Kovid Goyal (kovid) wrote :

On linux filesystem limits are 4096 characters. You sayig your filenames
are longer than that? Or are yu saving to some non-native filesystems
like a FAT32 filesystem?

Changed in calibre:
status: New → Invalid
Jucker (jucker7) wrote :

I've just tried save file and received this:

calibre, version 3.21.0
ERROR: Error while saving: Failed to save any books to disk, click "Show details" for more information

Failed to save the PDF format of: Про затвердження Порядку проведення розрахунків із співвласниками багатоквартирного будинку, які мають заборгованість перед об’єднанням співвласників такого багатоквартирного будинку, у разі виконання ними робіт, необхідних для утримання спільного майна співвласників by Кабінет Міністрів України to disk, with error:
    Traceback (most recent call last):
      File "/usr/lib/calibre/calibre/gui2/save.py", line 263, in write_book
        fmtpath = self.write_fmt(book_id, fmt, base_path)
      File "/usr/lib/calibre/calibre/gui2/save.py", line 284, in write_fmt
        with lopen(fmtpath, 'w+b') as f:
      File "/usr/lib/calibre/calibre/startup.py", line 139, in local_open
        ans = open(name, mode, bufsize)
    IOError: [Errno 36] Файл є занадто великим: u'/home/mrd/\u041f\u043e\u043e\u043a/\u041f\u0440\u043e \u0437\u0430\u0442\u0432\u0435\u0440\u0434\u0436\u0435\u043d\u043d\u044f \u041f\u043e\u0440\u044f\u0434\u043a\u0443 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u044f \u0440\u043e\u0437\u0440\u0430\u0445\u0443\u043d\u043a\u0456\u0432 \u0456\u0437 \u0441\u043f\u0456\u0432\u0432\u043b\u0430\u0441\u043d\u0438\u043a\u0430\u043c\u0438 \u0431\u0430\u0433\u0430\u0442\u043e\u043a\u0432\u0430\u0440\u0442\u0438\u0440\u043d\u043e\u0433\u043e \u0431\u0443\u0434\u0438\u043d\u043a\u0443, \u044f\u043a\u0456 \u043c\u0430\u044e\u0442\u044c \u0437\u0430\u0431\u043e\u0440\u0433\u043e\u0432\u0430\u043e \u0431\u0430\u0433\u0430\u0442\u043e\u043a\u0432\u0430\u0440\u0442\u0438\u0440\u043d\u043e\u0433\u043e \u0431\u0443\u0434\u0438\u043d\u043a\u0443, \u0443 \u0440\u0430\u0437\u0456 \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043d\u044f \u043d\u0438\u043c\u0438 \u0440\u043e\u0431\u0456\u0442, \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u0438\u0445 \u0434\u043b\u044f \u0443\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0441\u043f\u0456\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0439\u043d\u0430 \u0441\u043f\u0456\u0432\u0432\u043b\u0430\u0441\u043d\u0438\u043a\u0456\u0432.pdf'

 IOError: [Errno 36] Файл є занадто великим: ==> (ENG) IOError: [Errno 36] The file is too big.

When I make title of the file smaller, it saves normally. It error hapens with all formats I use.
Filesystem: ext4

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers