From 3840d51452246bb7d8b98327c98ef8bf18c1cb92 Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Sat, 13 Apr 2019 12:10:42 +0530 Subject: [PATCH] cephfs-shell: fix rm 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 ef1cb3bfa85..fd9122f3e54 100755 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -778,7 +778,10 @@ sub-directories, files') files.extend([i for i in get_all_possible_paths( file_path) if is_file_exists(i)]) else: - cephfs.unlink(to_bytes(file_path)) + try: + cephfs.unlink(to_bytes(file_path)) + except: + self.poutput('%s: no such file' % file_path) def complete_mv(self, text, line, begidx, endidx): """ -- 2.47.3