[Lldb-commits] [lldb] r154618 - /lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp

Johnny Chen johnny.chen at apple.com
Thu Apr 12 14:17:32 PDT 2012


Author: johnny
Date: Thu Apr 12 16:17:32 2012
New Revision: 154618

URL: http://llvm.org/viewvc/llvm-project?rev=154618&view=rev
Log:
Make 'platform put-file' command to also respect the -i option (ignore the remote hostname) when constructing the rsync command.

Modified:
    lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp

Modified: lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp?rev=154618&r1=154617&r2=154618&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp Thu Apr 12 16:17:32 2012
@@ -282,11 +282,17 @@
             if (destination.GetPath(dst_path) == 0)
                 return Error("unable to get file path for destination");
             StreamString command;
-            command.Printf("rsync %s %s %s:%s",
-                           GetRSyncOpts(),
-                           src_path.c_str(),
-                           GetHostname(),
-                           dst_path.c_str());
+            if (GetIgnoresRemoteHostname())
+                command.Printf("rsync %s %s %s",
+                               GetRSyncOpts(),
+                               src_path.c_str(),
+                               dst_path.c_str());
+            else
+                command.Printf("rsync %s %s %s:%s",
+                               GetRSyncOpts(),
+                               src_path.c_str(),
+                               GetHostname(),
+                               dst_path.c_str());
             if (RunShellCommand(command.GetData()) == 0)
             {
                 if (chown_file(this,dst_path.c_str(),uid,gid) != 0)





More information about the lldb-commits mailing list