From 38eb88249e9f59325d0452da4eb586b21b48b661 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 27 Apr 2021 09:12:11 -0400 Subject: [PATCH] Permit wildcard in syncfiles This was a supported and used feature in xCAT syncfiles, carry it into confluent syncfiles. --- confluent_server/confluent/syncfiles.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/syncfiles.py b/confluent_server/confluent/syncfiles.py index 977c4de1..fba09701 100644 --- a/confluent_server/confluent/syncfiles.py +++ b/confluent_server/confluent/syncfiles.py @@ -45,7 +45,7 @@ class SyncList(object): ent = ent[:cmtidx] except ValueError: pass - for special in '!@$%^&*()|{}': + for special in '!@$%^&()|{}': if special in ent: raise Exception( 'Special character "{}" reserved for future use'.format(special)) @@ -65,7 +65,10 @@ class SyncList(object): v = v.strip() else: k = ent - v = ent + if '*' in ent: + v = os.path.dirname(ent) + else: + v = ent currmap[k] = v