Default dst value for platform put-file.
authorChaoren Lin <chaorenl@google.com>
Wed, 20 May 2015 20:23:23 +0000 (20:23 +0000)
committerChaoren Lin <chaorenl@google.com>
Wed, 20 May 2015 20:23:23 +0000 (20:23 +0000)
Summary: It should default to working-dir/src-filename if dst is not specified.

Reviewers: clayborg, flackr

Reviewed By: flackr

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D9890

llvm-svn: 237831

lldb/source/Commands/CommandObjectPlatform.cpp

index b231c4a..f62a002 100644 (file)
@@ -1238,8 +1238,8 @@ public:
         const char* dst = args.GetArgumentAtIndex(1);
 
         FileSpec src_fs(src, true);
-        FileSpec dst_fs(dst, false);
-        
+        FileSpec dst_fs(dst ? dst : src_fs.GetFilename().GetCString(), false);
+
         PlatformSP platform_sp (m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
         if (platform_sp)
         {