]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephfs-shell: fix mv command
authorMilind Changire <mchangir@redhat.com>
Sat, 13 Apr 2019 05:00:22 +0000 (10:30 +0530)
committerMilind Changire <mchangir@redhat.com>
Sat, 13 Apr 2019 06:36:26 +0000 (12:06 +0530)
Signed-off-by: Milind Changire <mchangir@redhat.com>
src/tools/cephfs/cephfs-shell

index f8653043d79d6f4402d1591eaceacc6ad6b630eb..b2f039ce6ca02b46b65a474c413061314746c57a 100755 (executable)
@@ -796,7 +796,10 @@ sub-directories, files')
         """
         Rename a file or Move a file from source path to the destination
         """
-        cephfs.rename(to_bytes(args.src_path), to_bytes(args.dest_path))
+        try:
+            cephfs.rename(to_bytes(args.src_path), to_bytes(args.dest_path))
+        except:
+            self.poutput("error: need a file name to move to")
 
     def complete_cd(self, text, line, begidx, endidx):
         """