Bug 105057 - Creating or running Base Reports or creating forms leaves temp files on LibreOffice opening page and recent files menu
Summary: Creating or running Base Reports or creating forms leaves temp files on Libre...
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack
: 90318 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-01-02 22:17 UTC by Drew Jensen
Modified: 2023-07-16 02:27 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of temp file listed on main window (146.60 KB, image/png)
2017-01-02 22:17 UTC, Drew Jensen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Drew Jensen 2017-01-02 22:17:53 UTC
Created attachment 130104 [details]
Example of temp file listed on main window

Open any base file.
Select a table or query and from the context menu 'Report Wizard'
Add a column or two and execute the report.
Close the report. Saving it or not makes no difference.
Close the base file.
The temp odt file created when the report was displayed is now listed on the main LbreOffice window. 
See attachment - error box lists tmp file created
Comment 1 Drew Jensen 2017-01-02 22:18:58 UTC
Also - tested on Ubuntu 16.10 only.
Comment 2 Adolfo Jayme Barrientos 2017-01-02 23:40:17 UTC

*** This bug has been marked as a duplicate of bug 101302 ***
Comment 3 Drew Jensen 2020-03-06 16:02:46 UTC
I see how this is being 'fixed' in the open issue and it makes me more sure tht this is not a duplicate issue.

These files never should of been there, in the start center or the previous file menu in the first place and the fact they are was a regression.
Comment 4 Justin L 2020-07-01 19:40:01 UTC
I think this could fairly easily be implemented by resurrecting bug 89394's commit 93eefe54f5d6b6092371bad1e86444489d29eee2 and changing it to use:

OUString sSysTempPath;
if( osl::FileBase::getTempDirURL( sSysTempPath ) == osl::FileBase::E_None )
    bIsInTempPath = !sSysTempPath.isEmpty() && sURL.startsWith( sSysTempPath );

However, as IT support, I might like the debugging ability to see a recently edited file in the tmp folder that a user claims they worked on and is now lost. If you see that they only worked on a temporary copy, then it isn't a surprise that it is lost.  [But that scenario is less of an issue now, since saving doesn't recommend the tmp folder since LO 5.4's tdf#80807 guisaveas: never recommend system's tempdir.]

So there are some pros and cons in implementing this. Someone will probably complain if this bug report is fixed (since I had complaints about bug 80807 from someone who liked repeatedly saving to /tmp/). Regardless, I'll mark this as an EasyHack. Make sure you read and understand the arguments from bug 89394. The ideal fix would be a threaded approach as described in bug 101302 - but that is beyond EasyHack.
Comment 5 Justin L 2023-07-16 02:27:08 UTC
*** Bug 90318 has been marked as a duplicate of this bug. ***