1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-13 01:20:58 +00:00

Allow for upgrading built-in disks

This commit is contained in:
grossmj 2024-12-26 23:04:47 +07:00
parent efc3ff62b5
commit 249bf89b7e
No known key found for this signature in database
GPG Key ID: 1E7DD6DBB53FF3D7

View File

@ -344,6 +344,7 @@ class Controller:
dst_path = self.configs_path() dst_path = self.configs_path()
log.info(f"Installing base configs in '{dst_path}'") log.info(f"Installing base configs in '{dst_path}'")
try: try:
# do not overwrite base configs because they may have been customized by the user
Controller.install_resource_files(dst_path, "configs", upgrade_resources=False) Controller.install_resource_files(dst_path, "configs", upgrade_resources=False)
except OSError as e: except OSError as e:
log.error(f"Could not install base config files to {dst_path}: {e}") log.error(f"Could not install base config files to {dst_path}: {e}")
@ -357,7 +358,7 @@ class Controller:
dst_path = self.disks_path() dst_path = self.disks_path()
log.info(f"Installing built-in disks in '{dst_path}'") log.info(f"Installing built-in disks in '{dst_path}'")
try: try:
Controller.install_resource_files(dst_path, "disks", upgrade_resources=False) Controller.install_resource_files(dst_path, "disks")
except OSError as e: except OSError as e:
log.error(f"Could not install disk files to {dst_path}: {e}") log.error(f"Could not install disk files to {dst_path}: {e}")