Kaydet (Commit) eb9f9018 authored tarafından Justin Luth's avatar Justin Luth

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/33353Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
üst c0d3916c
......@@ -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::DecodeMechanism::NONE );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment