From ec38637a35dccdfda16efeab7866dc147dc380b9 Mon Sep 17 00:00:00 2001 From: Jian Zhang <jian.zhang@intel.com> Date: Sun, 24 Feb 2013 19:04:39 -0800 Subject: [PATCH] Added "/" check when list containers. If there is a "/" in container name, print usage. Fixs bug 1121897. Change-Id: I633b5b7ff3a8dbc249ddd3c65439dd46c7d93b4a --- bin/swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/swift b/bin/swift index 7c653cad..897475c6 100755 --- a/bin/swift +++ b/bin/swift @@ -527,7 +527,7 @@ def st_list(parser, args, print_queue, error_queue): args = args[1:] if options.delimiter and not args: exit('-d option only allowed for container listings') - if len(args) > 1: + if len(args) > 1 or len(args) == 1 and args[0].find('/') >= 0: error_queue.put('Usage: %s [options] %s' % (basename(argv[0]), st_list_help)) return