<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Files coming from a temp dir are offered to be saved back in the temp dir instead of default workdir"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=109537">109537</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Files coming from a temp dir are offered to be saved back in the temp dir instead of default workdir
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Inherited From OOo
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>framework
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>baron@caesar.elte.hu
          </td>
        </tr></table>
      <p>
        <div>
        <pre>As far as I know this issue only concerns Windows and not Linux, no idea about
OSX.

- Open a file directly from browser in LO (without saving it first), let's say
<span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=134280" name="attach_134280" title="Sample DOC (new)">attachment 134280</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=134280&action=edit" title="Sample DOC (new)">[details]</a></span>. File is downloaded in a temporary directory, and opens in
read-only mode.
- Click Save As...

=> File is offered to be saved in the temporary download directory (eg.
C:\Users\<User>\AppData\Local\Temp or
C:\Users\<user>\AppData\Local\Microsoft\Windows\Temporary Internet Files\...)
instead of the default folder for documents.


LO is supposed to be prepared to not suggest the system temporary directory:
<a href="https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/guisaveas.cxx#1151">https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/guisaveas.cxx#1151</a>
// Suggest somewhere other than the system's temp directory
if( aLocation.GetMainURL( INetURLObject::DecodeMechanism::NONE ).startsWith(
SvtPathOptions().GetTempPath() ) )

Note that the Windows file picker saves history, and LO generally takes that
into account and doesn't force its own suggestion in that case (see
<a href="https://opengrok.libreoffice.org/xref/core/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx#688">https://opengrok.libreoffice.org/xref/core/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx#688</a>
).

Nevertheless, the mechanism doesn't work, and the temporary directory is often
suggested in such case.
Apart from it not working, there are the following problems with this approach:
- There's not one single temporary directory.
- The mechanism looks for LO's Temp path config for temporary directory. By
default this is the system temp dir, but can be changed, and then it's not the
same as the system temp dir anymore.

LO's default temp path (eg. $(temp)) is substituted using
osl::FileBase::getTempDirURL(...).

Observed using 6.0 master build (a4bab9609b04cb644859cf548bb4739a9d5aa590) &
3.3.0 / Windows 7.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>