When you download something and choose to open it in LibreOffice, it will be saved in /tmp. If you choose Save As, the default saving location will be in /tmp. I just lost a partly written exam that way. I thought it was on my Desktop, but oh no, it was in /tmp and after rebooting it's now gone. The suggestion is to NEVER let /tmp be the default folder in the Save dialog, and to ALWAYS warn the user if saving something there.
EasyHackify
Could you please provide a code pointer for this?
The file picker code is in http://opengrok.libreoffice.org/xref/core/fpicker/ . I would suggest to just check the initial path for being /tmp (on unix only) and falling back to $HOME in that case.
I was not able to reproduce this bug. Has it already been fixed?
Oops, I did not fully understand the bug, but was able to reproduce it just now. I will take a look into this. There was a suggestion to warn the user if something is saved in the /tmp directory-- could I please get a code pointer as to how to do that?
Andrzej J. R. Hunt committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=dd2fe95cce75f1157bd1c75d286a0047b2e4175e fdo#43895 lp#905355: Never let users save in /tmp by default
The bug is fixed
Sorry, that was incorrect. The bug is fixed under Unix, but still needs to be fixed for Windows which will involve changing one line (which I'll do once I'm finished with what I'm currently working on).
Andrzej J. R. Hunt committed a patch related to this issue. It has been pushed to "libreoffice-3-5": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2890ca399dd23abd9b8b507d80f7242fce735278&g=libreoffice-3-5 fdo#43895 lp#905355: Never let users save in /tmp by default It will be available in LibreOffice 3.5.3.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=dc2fe18e95731dcb7c9e2027f45fdaf265490592 fdo#43895 lp#905355: fix the fix so it doesn't crash
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-3-5": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cac9cf690bf337a97ede781c38c5e7ddb3f37ca5&g=libreoffice-3-5 fdo#43895 lp#905355: fix the fix so it doesn't crash It will be available in LibreOffice 3.5.3.
Stephan Bergmann committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2d0ff6aa5d6951aaa00e2d6cf3878788b025983e Related fdo#43895: Fixed shortcommings of FileDialogHelper_Impl::verifyPath
There is FileBase.getTempDirURL() which is better to use than hardcoded "/tmp" path.
Deleted "Easyhack" from summary.
Stephan Bergmann committed a patch related to this issue. It has been pushed to "libreoffice-3-5": http://cgit.freedesktop.org/libreoffice/core/commit/?id=89f45b9fef98650cc3166d9337c96e58f0c57c4f&g=libreoffice-3-5 Related fdo#43895: Fixed shortcommings of FileDialogHelper_Impl::verifyPath It will be available in LibreOffice 3.5.5.
@Sergey, agreed. we should not be hardcoding file://tmp when there are propoer functions to get the tempdir. Can you file a followup bug that can be marked as another EasyHack?
I think it _is_ a good idea to use a hardcoded path here. After all we are evading saving to /tmp, when another app (Firefox) put a file there. As tempdirs in configured in LibreOffice and Firefox might differ, you end up SOL in that case anyway. So keeping the current heuristic and just being caring about the "tmp" case should be the best we can do anyway. resolving
*** Bug 48053 has been marked as a duplicate of this bug. ***
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp ) [NinjaEdit]