[Libreoffice-bugs] [Bug 109537] Files coming from a temp dir are offered to be saved back in the temp dir instead of default workdir

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Jul 31 11:51:01 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=109537

--- Comment #2 from Aron Budea <baron at caesar.elte.hu> ---
The plan is to update the followig piece of code (added for bug 80807):
https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/guisaveas.cxx#1151
// Suggest somewhere other than the system's temp directory
if( aLocation.GetMainURL( INetURLObject::DecodeMechanism::NONE ).startsWith(
SvtPathOptions().GetTempPath() ) )

1. Use osl::FileBase::getTempDirURL(...) instead of
SvtPathOptions().GetTempPath() to get system temporary directory, and check
against that.

2. Add an additional, Windows-specific check, get the Temporary Internet Files
location, and check if path is inside that.

a. Before Vista (and kept for compatibility reasons):

Call to SHGetFolderPath can be used:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb762181(v=vs.85).aspx

The value for nFolder is CSIDL_INTERNET_CACHE (from here:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494(v=vs.85).aspx
)

b. Since Vista:

Call to SHGetKnownFolderPath can be used:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb762188(v=vs.85).aspx

The value for rfid is FOLDERID_InternetCache (from here:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494(v=vs.85).aspx
)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170731/cd827243/attachment-0001.html>


More information about the Libreoffice-bugs mailing list