From bca5d60a09ad58a7d0becf90257f7ce6dacbcf37 Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Sat, 13 Apr 2019 10:30:22 +0530 Subject: [PATCH] cephfs-shell: fix mv command Signed-off-by: Milind Changire --- src/tools/cephfs/cephfs-shell | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index f8653043d79..b2f039ce6ca 100755 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -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): """ -- 2.47.3