]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common source file changes not directly applicable to open-vm-tools.
authorOliver Kurth <okurth@vmware.com>
Wed, 27 Feb 2019 22:39:55 +0000 (14:39 -0800)
committerOliver Kurth <okurth@vmware.com>
Wed, 27 Feb 2019 22:39:55 +0000 (14:39 -0800)
open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnD.hh
open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnDSrc.cc

index f9db75b82ff7a7c381966f5dd15bb72975323500..1e5f3870d993e7bb36df2221baaaf7e779689ea1 100644 (file)
@@ -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;
index 1ab0ff2e5e9134eaf9d49254313c59b87614a857..e85dc9d02319782d1e3ea8c1466911e2220a7e79 100644 (file)
@@ -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). */