More accurate backup regex.
Fixed an issue with picking up other backups when the names partially match.pull/1151/head
parent
bb18c55003
commit
9e998da84d
|
|
@ -903,8 +903,8 @@ class WireguardConfiguration:
|
|||
files.sort(key=lambda x: x[1], reverse=True)
|
||||
|
||||
for f, ct in files:
|
||||
if RegexMatch(f"^({self.Name})_(.*)\\.(conf)$", f):
|
||||
s = re.search(f"^({self.Name})_(.*)\\.(conf)$", f)
|
||||
if RegexMatch(f"^({self.Name})_(\d*)\\.(conf)$", f):
|
||||
s = re.search(f"^({self.Name})_(\d*)\\.(conf)$", f)
|
||||
date = s.group(2)
|
||||
d = {
|
||||
"filename": f,
|
||||
|
|
|
|||
Loading…
Reference in New Issue