Bug 54949 - Cannot open a .docx file when the extension is changed to ".doc"
Summary: Cannot open a .docx file when the extension is changed to ".doc"
Status: RESOLVED DUPLICATE of bug 59426
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: Other macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-15 03:38 UTC by haim kilov
Modified: 2013-03-20 11:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
This is the small file that opens with the docs extension and without any extension but refuses to open with a doc extension. (3.84 KB, application/msword)
2012-09-15 03:38 UTC, haim kilov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description haim kilov 2012-09-15 03:38:16 UTC
Created attachment 67193 [details]
This is the small file that opens with the docs extension and without any extension but refuses to open with a doc extension.

Attached is a small docx file that cannot be opened by LO when its extension is changed to doc ("The file 'xxxx' is corrupt and therefore cannot be opened..."). Moreover, when the answer to "Should LO repair the file" is "no" LO loops! When the answer is "yes" LO says "Error reading file". However, when the extension is deleted altogether LO opens the file without any problems. I suggest LO ought to try harder if possible!
Comment 1 haim kilov 2012-09-15 03:39:37 UTC
OOPS! Sorry, I meant "docx" extension, not "docs" extension. Typo, my fault.
Comment 2 Roman Eisele 2012-09-16 12:49:32 UTC
Looking into it ...
Comment 3 Roman Eisele 2012-09-16 13:09:51 UTC
REPRODUCIBLE with any LibreOffice version since 3.3.0 until the newest master builds (LOdev). All versions behave exactly like Haim Kilov described.


The question is: is this a bug?

(a) On the one hand, one could argue that LibO must honour the file extension, and that, if the the file extension is wrong, LibO should not even open the file. Especially “power users” which are used to manipulate file extensions for special purposes (e.g., changing the extension of a .odt file to “.zip” for un-zipping it), might prefer this view.

(b) On the other hand, a “normal” user would expect that software is a bit smarter about file types, especially in this case, when LibO is able to recognize the correct file type when there is no extension at all (as it was common on earlier Mac OS versions). Especially long-time Mac users are used to the automatic recognition of the right file type and can’t believe that a letter more or less in the file name prevents the file from being opened. And “normal users” might think that “.doc” and “.docx” are very similar, so that each of these extensions should work (a “normal user” does not know how extremely different these file formats are!).

I don’t know how to find an authoritative answer here.

Just an idea: what does MS Office do? Can it open .docx files with “.doc” extension (and the other way around)? Maybe we could follow its example then ...
Comment 4 Roman Eisele 2012-09-16 13:12:20 UTC
(Reset “Version” to oldest version in which issue is known to exist -- this is how we use the “Version” field.)
Comment 5 haim kilov 2012-09-16 17:12:29 UTC
I think this is a bug, at the very least in the Mac environment (see under (b)), especially since LO works perfectly well if there is no extension at all. I would not rely too much on what MS does, LO should be better!

Even if LO refuses to open the file then it should provide an error message stating that the extension is wrong rather than provide a cryptic error message about a "corrupt" file. After all, LO currently requests permission to "repair" the file, that should be, in this context, to open it with a proper extension.
Comment 6 Andir 2012-12-02 09:38:17 UTC
I can confirm this bug for Windows 7 x64 system and LibreOffice 3.5.7

My case: 
I've installed InSync (dropbox like application), and it synchronized my Google documents with my local folder, but it also converts GDocs format to Microsoft Office docx format with doc extension. So I can't open any document with LibreOffice and Microsoft Word Viewer. If I rename extension from docx to doc - I can open files but they will not be synchronized with Google Documents anymore.
Comment 7 Andras Timar 2013-03-19 20:55:01 UTC
*** Bug 57769 has been marked as a duplicate of this bug. ***
Comment 8 Erik P. Olsen 2013-03-19 22:02:36 UTC
(In reply to comment #3)
> 
> Just an idea: what does MS Office do? Can it open .docx files with “.doc”
> extension (and the other way around)? Maybe we could follow its example then
> ...

I can confirm that MS Office will open docx files with .doc extension without any problem. Many companies send out documents in docx format with .doc extensions. I recently encountered it in a work report issued by a service person from Miele after having repaired my dish washer.
Comment 9 Andras Timar 2013-03-20 11:41:41 UTC

*** This bug has been marked as a duplicate of bug 59426 ***