After upgrading my Fritz!Box 7490 to the latest Fritz!OS 7.20 i ran into a problem while using LibreOffice. Whenever i saved a document in LibreOffice on my Fritz!Box NAS, i couldn't open it thereafter. It's scrambled and LibreOffice just offered me an import dialog for unknown file types. Damn, are my files lost? ... No! We can recover them and solve the problem with a simple workaround.
After searching the web for any information about this problem i learned that changing to another LibreOffice version, switching back to SMB 1.0 protocol version or any other version changes of adjacent programs didn't help anyone, i started fiddling with the mount options myself. And i got a solution by just turning of the caching! This can be achieved by adding the following option to the mount command:
For a full mount command line example see my other article, which i have updated now because of this problem.
Well, to me a caching problem doesn't seem like to be caused by LibreOffice itself. It's probably the SMB client or more likely the configuration of the new SMB server implementation YNQ after AVM switched away from their formerly used SAMBA with the latest FRITZ!OS.
Now to the broken files themselves. They aren't lost, they just contain some unwanted bytes at their beginning. If we remove these, LibreOffice can open these files as documents again without any loss of data. Open any file editor you like for this. Best is to compare with a normal written file first to see up to which point you have to delete the first few bytes.