Skip to content

Commit f854aaf

Browse files
committed
bug fix: in backups v2
1 parent a6f8a85 commit f854aaf

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

backup/backupManager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,7 @@ def CreateV2BackupStatus(self, userID=None, data=None):
18591859

18601860
statusFile = f'/home/cyberpanel/{domain}_rustic_backup_log'
18611861

1862-
if ACLManager.CheckStatusFilleLoc(statusFile):
1862+
if ACLManager.CheckStatusFilleLoc(statusFile, domain):
18631863
pass
18641864
else:
18651865
data_ret = {'abort': 1, 'installStatus': 0, 'installationProgress': "100",

plogical/acl.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,13 +881,19 @@ def CheckDomainBlackList(domain):
881881
return 1
882882

883883
@staticmethod
884-
def CheckStatusFilleLoc(statusFile):
884+
def CheckStatusFilleLoc(statusFile, domain=None):
885885
TemFilePath = statusFile.split('panel/')[1]
886886

887887
try:
888888
value = int(TemFilePath)
889889
print(value)
890890
except:
891+
if domain != None:
892+
value = statusFile.split('cyberpanel/')[1]
893+
#logging.writeToFile(f'value of log file {value}')
894+
if value == f'{domain}_rustic_backup_log':
895+
return 1
896+
891897
return 0
892898

893899
if (statusFile[:18] != "/home/cyberpanel/." or statusFile[:16] == "/home/cyberpanel" or statusFile[

0 commit comments

Comments
 (0)