Fix excluded directories not being separatable

Excluded directories were being pulled from the database as not a string, so I just used the get_backup_config() method to pull exclusions as a string so I could split it
This commit is contained in:
xithical 2022-02-27 13:38:16 -06:00
parent cf5bfe88c1
commit 4b484782c6
2 changed files with 2 additions and 2 deletions

View File

@ -357,7 +357,7 @@ class helpers_management:
@staticmethod
def get_excluded_backup_dirs(server_id: int):
excluded_dirs = Backups.select(Backups.excluded_dirs).where(Backups.server_id == server_id).execute()
excluded_dirs = helpers_management.get_backup_config(server_id)['excluded_dirs']
dir_list = excluded_dirs.split(",")
return dir_list

View File

@ -571,7 +571,7 @@ class Server:
f" (ID#{self.server_id}, path={self.server_path}) at '{backup_filename}'")
tempDir = tempfile.mkdtemp()
shutil.copytree(self.server_path, tempDir)
shutil.copytree(self.server_path, tempDir, dirs_exist_ok=True)
excluded_dirs = management_helper.get_excluded_backup_dirs(self.server_id)
server_dir = helper.get_os_understandable_path(self.settings['path'])