Bug 66860 - Importing templates: problem with filenames longer then 255 chars, without period, and without ott
Summary: Importing templates: problem with filenames longer then 255 chars, without pe...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.1 rc
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Template-Manager
  Show dependency treegraph
 
Reported: 2013-07-12 16:26 UTC by Nick Bowler
Modified: 2023-12-04 03:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Bowler 2013-07-12 16:26:53 UTC
Attempting to import a template using the "Import" button in the dialog from
"File -> New -> Templates" behaves badly if the filename does not end in
".ott".  Libreoffice will produce no error message whatsoever, but will
actually perform a copy of the file into

  ~/.config/libreoffice/4/user/templates

and will append a period to the file name if the filename does not currently
contain a period.  Despite the apparent successful import as no error messages
were produced, the result is that the imported template does not show up in
the dialog and cannot be used.  The badly-imported template, however, *does*
show up in the dialog that opens when you say "File -> Save As Template...",
which is a bit weird...

If the imported filename was 255 characters long, and did not contain a
period, libreoffice does not even successfully copy the file and still does
not produce any error message whatsoever.

Manually enaming the file in ~/.config/libreoffice/4/user/templates to end
with ".ott" after the fact appears to correct the issue.
Comment 1 Cor Nouws 2013-07-12 20:33:26 UTC
Thanks for the report Nick!
- Set to new,
- Clarify summary
- Set version to 4.0.0x - where it was first.

Kind regards
Cor
Comment 2 Nick Bowler 2013-07-12 20:55:58 UTC
Just to clarify: the 255 character case is the filename length limit of the
filesystem (really 255 bytes).

So the copy presumably fails in this case because appending a period to a
255-byte filename results in a 256-byte filename which cannot be created.
Ideally the import would still work in this case, but failing with an
appropriate error message would be OK too.  Silently doing nothing is
not cool.
Comment 3 QA Administrators 2015-04-01 14:41:50 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2015-04-24 10:20:36 UTC
Reproduced.

Win 7 Pro 64-bit Version: 5.0.0.0.alpha1+ (x64)
Build ID: f3375fa07f27bd2ade519af3c07d69040d10eaa9
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-22_23:38:50
Locale: fi_FI
Comment 5 QA Administrators 2016-09-20 09:32:19 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2019-12-03 14:11:14 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2021-12-03 04:29:10 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2023-12-04 03:15:54 UTC
Dear Nick Bowler,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug