From: Sapan Bhatia Date: Fri, 11 Sep 2009 16:08:42 +0000 (+0000) Subject: Bug fix. X-Git-Tag: sfa-0.9-2~40 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=fb8bd835b4f25a8cdfb23e088849fbe0db77b779 Bug fix. --- 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):