From: Oliver Kurth Date: Wed, 27 Feb 2019 22:39:55 +0000 (-0800) Subject: Common source file changes not directly applicable to open-vm-tools. X-Git-Tag: stable-11.0.0~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1703710a2706527748ec7be6767c14f2fcf63fc2;p=thirdparty%2Fopen-vm-tools.git Common source file changes not directly applicable to open-vm-tools. --- diff --git a/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnD.hh b/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnD.hh index f9db75b82..1e5f3870d 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnD.hh +++ b/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnD.hh @@ -171,6 +171,7 @@ protected: uint32 sz); virtual const std::string& SetupDestDir(const std::string &destDir); virtual void CleanStagingFiles(bool fileTransferResult) { } + virtual bool NeedSetupDestDir(const CPClipboard *clip) { return true; } GuestDnDMgr *mMgr; DnDRpc *mRpc; diff --git a/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnDSrc.cc b/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnDSrc.cc index 1ab0ff2e5..e85dc9d02 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnDSrc.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnDSrc.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2018 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2019 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -83,11 +83,14 @@ GuestDnDSrc::OnRpcDragBegin(const CPClipboard *clip) ASSERT(clip); g_debug("%s: state is %d\n", __FUNCTION__, mMgr->GetState()); - /* Setup staging directory. */ - mStagingDir = SetupDestDir(""); - if (mStagingDir.empty()) { - g_debug("%s: SetupDestDir failed.\n", __FUNCTION__); - return; + + if (NeedSetupDestDir(clip)) { + /* Setup staging directory. */ + mStagingDir = SetupDestDir(""); + if (mStagingDir.empty()) { + g_debug("%s: SetupDestDir failed.\n", __FUNCTION__); + return; + } } /* Show detection window in (0, 0). */