Kaydet (Commit) 36d91a65 authored tarafından Julien Nabet's avatar Julien Nabet

tdf#40713: dBASE, don't lose dbt file

if aDbtFile corresponds exactly to aTmpFile, we just have to return

Change-Id: I1dde8efbe01838dc94f6025d5b81f5aee01932ac
Reviewed-on: https://gerrit.libreoffice.org/39189Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 4493f983
......@@ -2379,6 +2379,12 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
const SfxStringItem* pNameItem = rMed.GetItemSet()->GetItem<SfxStringItem>( SID_FILE_NAME );
INetURLObject aDbtFile( pNameItem->GetValue(), INetProtocol::File );
aDbtFile.setExtension("dbt");
// tdf#40713: don't lose dbt file
// if aDbtFile corresponds exactly to aTmpFile, we just have to return
if (aDbtFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) == aTmpFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ))
return bRet;
if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) )
bRet = false;
if ( bRet && !MoveFile( aTmpFile, aDbtFile ) )
......
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