]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/cephfs-shell:resolved removing files using pattern inside sub-directories
authorPavani Rajula <rpavani1998@gmail.com>
Tue, 14 Aug 2018 18:27:54 +0000 (23:57 +0530)
committerPavani Rajula <rpavani1998@gmail.com>
Fri, 17 Aug 2018 18:07:24 +0000 (23:37 +0530)
Signed-off-by: Pavani Rajula <rpavani1998@gmail.com>
src/tools/cephfs/cephfs-shell

index a71485a9dfc15aa8cac25f691837890ac012fba2..328b0231b1c7565738516eb73600ae68c51b2c5e 100644 (file)
@@ -668,7 +668,7 @@ sub-directories, files')
         files = args.file_paths
         for file_path in files:
             if file_path.count('*') > 0:
-                files.extend(get_all_possible_paths(file_path))
+                files.extend([i for i in get_all_possible_paths(file_path) if is_file_exists(i)])
             else:
                 cephfs.unlink(to_bytes(file_path))