Bug 111070 - Saving file with a different LO-recognized file extension does not add correct extension
Summary: Saving file with a different LO-recognized file extension does not add correc...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 130413 142476 (view as bug list)
Depends on:
Blocks: File-Dialog
  Show dependency treegraph
 
Reported: 2017-08-01 21:56 UTC by Aron Budea
Modified: 2024-04-26 03:17 UTC (History)
5 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 Aron Budea 2017-08-01 21:56:42 UTC
This issue might be Windows-only.

- For reference, save a new file without extension (eg. "abcd"), with default, ODT type.

=> Correctly, ".odt" extension is added, so the file is named "abcd.odt".

- Another correct example, save it with a bogus extension (eg. "abcd.12").

=> Correctly, ".odt" extension is added, so the file is named "abcd.12.odt".

- Now save it with the name "abcd.doc" (don't change type).

=> ".odf" extension is not added, file is saved with the name "abcd.doc", but in ODF format, which is bad.

I could imagine the behavior depending on "Automatic file name extension" (the setting is Win-only, though), but it wasn't touched, and it's checked the whole time.

Observed with LO 5.4.0.3 & 3.3.0 / Windows 7.
Comment 1 Aron Budea 2017-08-01 22:05:31 UTC
This explains Samuel's observation in bug 57860 comment 1 (123 is Lotus 1-2-3 extension).
Comment 2 Timur 2017-08-02 07:20:58 UTC
Right, annoying, congrats you reported. 
Not sure how Linux sets filetype right, but I mark as Windows-only bug.
Comment 3 Aron Budea 2017-08-02 15:55:18 UTC
Timur, I'm changing the summary back to the original if you don't mind. My expectation is not that it should save with the type corresponding to the extension (this has been dismissed in bug 93199), but the opposite:
It should append the extension corresponding to the selected type if "Automatic file name extension" is checked.
Comment 4 Yousuf Philips (jay) (retired) 2017-08-02 16:25:59 UTC
(In reply to Aron Budea from comment #0)
> - Now save it with the name "abcd.doc" (don't change type).
> 
> => ".odf" extension is not added, file is saved with the name "abcd.doc",
> but in ODF format, which is bad.

So you expect it to have saved it to abcd.doc.odf?
Comment 5 Aron Budea 2017-08-02 16:51:25 UTC
(In reply to Yousuf Philips (jay) from comment #4)
> So you expect it to have saved it to abcd.doc.odf?

Yes, it might not be what the user wanted to happen, as they might've expected to change the file type, but the behavior would be clear.
Comment 6 Yousuf Philips (jay) (retired) 2017-08-02 16:54:01 UTC
(In reply to Aron Budea from comment #5)
> Yes, it might not be what the user wanted to happen, as they might've
> expected to change the file type, but the behavior would be clear.

I would think it would be a bad thing to do this, as extensions on windows are hidden by default and users would only see 'abcd.doc' and assume it was a '.doc' file. Instead it should replace the extension and be 'abcd.odf', if we agree that filetype selection should overwrite what users type or select as the filename.
Comment 7 Aron Budea 2017-08-03 03:18:21 UTC
(In reply to Yousuf Philips (jay) from comment #6)
> I would think it would be a bad thing to do this, as extensions on windows
> are hidden by default and users would only see 'abcd.doc' and assume it was
> a '.doc' file. Instead it should replace the extension and be 'abcd.odf', if
> we agree that filetype selection should overwrite what users type or select
> as the filename.

And I would be extremely careful with changing what the user has input... Appending the extension of the selected type is the normal behavior, this is just a matter of being consistent.

You could consider adding a warning dialog that lets the user know the file is saved with the selected type instead of what corresponds to the manually typed extension, maybe even let the user choose.

I'd say this is something that can be considered for the future, but as an immediate fix to the current situation, which is absolutely wrong, adding the correct extension would be enough.
Comment 8 QA Administrators 2018-08-04 02:38:28 UTC Comment hidden (obsolete)
Comment 9 Joao Farias 2018-08-07 20:29:08 UTC
Still reproducible.

Version: 6.1.0.2 (x64)
Build ID: b3972dcf1284967612d5ee04fea9d15bcf0cc106
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: en-US (en_US); Calc: group threaded
Comment 10 Aron Budea 2018-08-07 21:13:16 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2019-08-19 06:57:43 UTC Comment hidden (obsolete)
Comment 12 Aron Budea 2019-08-26 00:02:32 UTC
Still occurs in LO 6.4.0.0.alpha0+ (d3d13140f0036c53aa74820b41acfeffa3572168) / Windows 7.
Comment 13 Buovjaga 2020-05-10 12:21:30 UTC
*** Bug 130413 has been marked as a duplicate of this bug. ***
Comment 14 Mike Kaganski 2020-06-29 05:59:42 UTC
(In reply to Yousuf Philips (jay) (retired) from comment #6)
> I would think it would be a bad thing to do this, as extensions on windows
> are hidden by default and users would only see 'abcd.doc' and assume it was
> a '.doc' file.

This is comparing current situation (when user saves "file.doc", gets "file.doc", sees it as "file", and in fact it's ODT) with saving "file.doc", getting "file.doc.odt", seeing "file.doc", which in fact is ODT. Personally I don't see a single drawback of the proposal *compared to the current situation*. The concern expressed in comment 6 was a kind of generic "we see one extension, but that's the other one", but without considering what the current situation is.

> Instead it should replace the extension and be 'abcd.odf', if
> we agree that filetype selection should overwrite what users type or select
> as the filename.

I second Aron's concerns from comment 7, and I would hate to see LibreOffice not allowing me to have what I typed in the file name.
Comment 15 Timur 2022-04-26 07:24:56 UTC
*** Bug 142476 has been marked as a duplicate of this bug. ***
Comment 16 QA Administrators 2024-04-26 03:17:59 UTC
Dear Aron Budea,

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