mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
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:
parent
cf5bfe88c1
commit
4b484782c6
@ -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
|
||||
|
||||
|
@ -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'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user