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!
OOPS! Sorry, I meant "docx" extension, not "docs" extension. Typo, my fault.
Looking into it ...
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 ...
(Reset “Version” to oldest version in which issue is known to exist -- this is how we use the “Version” field.)
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.
I can confirm this bug for Windows 7 x64 system and LibreOffice 3.5.7
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.
*** Bug 57769 has been marked as a duplicate of this bug. ***
(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.
*** This bug has been marked as a duplicate of bug 59426 ***