From fb8bd835b4f25a8cdfb23e088849fbe0db77b779 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Fri, 11 Sep 2009 16:08:42 +0000 Subject: [PATCH] Bug fix. --- sfatables/commands/Add.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sfatables/commands/Add.py b/sfatables/commands/Add.py index 36b22c3c..4f0e6067 100644 --- a/sfatables/commands/Add.py +++ b/sfatables/commands/Add.py @@ -14,11 +14,11 @@ class Add(Command): def getnextfilename(self,type,chain): dir = sfatables_config + "/"+chain; - last_rule_number = 1 + last_rule_number = 0 for (root, dirs, files) in os.walk(dir): for file in files: - if (file.startswith('sfatables-')): + if (file.startswith('sfatables-') and file.endswith(type)): number_str = file.split('-')[1] number = int(number_str) if (number>last_rule_number): -- 2.47.0