attaching long file name to new appointment succeeds, but fails to existing appointment
In local calendar a file with a long file name can be attached to a new appointment if absolute path (user home directory, Evolution path, file name) does not exceed 333 characters. This number might depend on the file-system. I am using btfs file-system for /home. Use case: you save a file to an EWS calendar appointment. At a later point you download the file, modify it and want to add updated file to attachment.
current situation:
- local account's calendar: no difference between saving to new or old appointment
- EWS calendar (mailbox hosted on Microsoft Exchange Server 2016): difference between saving to new or old appointment, because saving to old appointment makes Evolution increase length of random part at start of file name, which exceeds maximum file name length
Is it possible to keep the random part the same length? It is fine if that is not possible.
I can reproduce with Evolution 3.48.4 on Fedora 38 and Evolution 3.50.2 on Fedora 39. Package versions on Fedora 38:
$ rpm -qa *evolution* | sort
evolution-3.48.4-1.fc38.x86_64
evolution-data-server-3.48.4-1.fc38.x86_64
evolution-data-server-langpacks-3.48.4-1.fc38.noarch
evolution-ews-3.48.2-2.fc38.x86_64
evolution-ews-langpacks-3.48.2-2.fc38.noarch
evolution-langpacks-3.48.4-1.fc38.noarch
evolution-pst-3.48.4-1.fc38.x86_64
On Fedora 39:
$ rpm -qa *evolution* | sort
evolution-3.50.2-1.fc39.x86_64
evolution-data-server-3.50.2-1.fc39.x86_64
evolution-data-server-langpacks-3.50.2-1.fc39.noarch
evolution-ews-3.50.2-2.fc39.x86_64
evolution-ews-langpacks-3.50.2-2.fc39.noarch
evolution-langpacks-3.50.2-1.fc39.noarch
evolution-pst-3.50.2-1.fc39.x86_64
preparation steps
- configure Fedora with local user account "user" with "/home/user" as home directory; log in to it; configure your EWS account in Evolution
- in home directory create file
aaaaaaaaaa bbbbbbbbbb cccccccccc dddddddddd eeeeeeeeee ffffffffff gggggggggg hhhhhhhhhh iiiiiiiiii jjjjjjjjjj kkkkkkkkkk llllllllll mmmmmmmmmm nnnnnnnnnn oooooooooo pppppppppp qqqqqqqqqq rrrrrrrrrr ssssssssss tt.txt
- switch to Evolution's calendar window; select EWS calendar
From this base I branch into different cases.
case "create appointment with attachment in one step"
- right mouse button click in calendar and click on "New Appointment..."
- in appointment window: in General tab: set summary to "test"; in Attachments tab: drag-and-drop file from preparation step 2; click on [Save and Close] button
- in appointment window at top an area with error message appears:
Failed to save attachments
Error opening file “/home/user/.cache/evolution/calendar/d34f0bb2a9cbf4eecd6072b23c33166ef7200b12/382757ce76b0a26f876b35539aa7fe6f50177feb-aaaaaaaaaa bbbbbbbbbb cccccccccc dddddddddd eeeeeeeeee ffffffffff gggggggggg hhhhhhhhhh iiiiiiiiii jjjjjjjjjj kkkkkkkkkk llllllllll mmmmmmmmmm nnnnnnnnnn oooooooooo pppppppppp qqqqqqqqqq rrrrrrrrrr ssssssssss tt.txt”: File name too long
- delete file in attachment tab; close error message with [x] button in top area
- shorten file name by one character (tt.txt -> t.txt); attach shortened file; click [Save and Close]: works
case "save appointment; afterwards attach file to it"
- right mouse button click in calendar and click on "New Appointment..."
- in appointment window: in General tab: set summary to "test"; click on [Save and Close]
- open appointment; switch to Appointments tab; attach file shortened file; click on [Save and Close]
- in appointment window at top an area with error message appears:
Failed to save attachments
Error opening file “/home/user/.cache/evolution/calendar/d34f0bb2a9cbf4eecd6072b23c33166ef7200b12/040000008200E00074C5B7101A82E008000000009AA495292D43DA01000000000000000010000000C3F07E4D24890142BD06FB4040A2C89E-aaaaaaaaaa bbbbbbbbbb cccccccccc dddddddddd eeeeeeeeee ffffffffff gggggggggg hhhhhhhhhh iiiiiiiiii jjjjjjjjjj kkkkkkkkkk llllllllll mmmmmmmmmm nnnnnnnnnn oooooooooo pppppppppp qqqqqqqqqq rrrrrrrrrr ssssssssss t.txt”: File name too long
- longest not-working file name for this case is
aaaaaaaaaa bbbbbbbbbb cccccccccc dddddddddd eeeeeeeeee ffffffffff gggggggggg hhhhhhhhhh iiiiiiiiii jjjjjjjjjj kkkkkkkkkk llllllllll mmmmmmm.txt
with error message:Failed to save attachments
Error opening file “/home/user/.cache/evolution/calendar/d34f0bb2a9cbf4eecd6072b23c33166ef7200b12/040000008200E00074C5B7101A82E008000000009AA495292D43DA01000000000000000010000000C3F07E4D24890142BD06FB4040A2C89E-aaaaaaaaaa bbbbbbbbbb cccccccccc dddddddddd eeeeeeeeee ffffffffff gggggggggg hhhhhhhhhh iiiiiiiiii jjjjjjjjjj kkkkkkkkkk llllllllll mmmmmmm.txt”: File name too long
- shorten by one more character and saving works with file name
aaaaaaaaaa bbbbbbbbbb cccccccccc dddddddddd eeeeeeeeee ffffffffff gggggggggg hhhhhhhhhh iiiiiiiiii jjjjjjjjjj kkkkkkkkkk llllllllll mmmmmm.txt