[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sfx2/source
Justin Luth
justin_luth at sil.org
Mon Jul 31 11:15:44 UTC 2017
sfx2/source/doc/guisaveas.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit e115163c966b3f7fb9f877ca6e5dc643142138dc
Author: Justin Luth <justin_luth at sil.org>
Date: Fri Jan 20 15:59:25 2017 +0300
tdf#80807 guisaveas: never recommend system's tempdir
Various download-and-open mechanisms save to the system's
$TEMP dir. If so, don't recomment saving in that same
location in the GUI dialog! That's just silly.
Change-Id: Ifa20fdfd81d768bbd893f92a50355f08c3aab356
Reviewed-on: https://gerrit.libreoffice.org/33353
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Justin Luth <justin_luth at sil.org>
(cherry picked from commit eb9f90186ae52efa7ff884b3e64f5dd59ddc0329)
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 7dcc6286271c..50a554530260 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1201,6 +1201,10 @@ OUString ModelData_Impl::GetRecommendedDir( const OUString& aSuggestedDir )
aLocation = INetURLObject( SvtPathOptions().GetWorkPath() );
}
+ // Suggest somewhere other than the system's temp directory
+ if( aLocation.GetMainURL( INetURLObject::DecodeMechanism::NONE ).startsWith( SvtPathOptions().GetTempPath() ) )
+ aLocation = INetURLObject( SvtPathOptions().GetWorkPath() );
+
aLocation.setFinalSlash();
if ( !aLocation.HasError() )
aRecommendedDir = aLocation.GetMainURL( INetURLObject::NO_DECODE );
More information about the Libreoffice-commits
mailing list