mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-07 05:24:47 +08:00
Upgrader: Allow tar.gz and zip archives
This commit is contained in:
parent
68f67ec83c
commit
89cda1e7a3
1 changed files with 5 additions and 1 deletions
|
@ -89,7 +89,11 @@ def get_current_version() -> Optional[CurrentVersion]:
|
|||
def get_file(
|
||||
file: FileGet, content: bool = False
|
||||
) -> Optional[Union[FileSend, bytes, dict]]:
|
||||
possible_filename = f"npbackup-{file.build_type.value}.zip"
|
||||
if file.platform.value == "windows":
|
||||
extension = "zip"
|
||||
else:
|
||||
extension = "tar.gz"
|
||||
possible_filename = f"npbackup-{file.build_type.value}.{extension}"
|
||||
path = os.path.join(
|
||||
config_dict["upgrades"]["data_root"],
|
||||
file.platform.value,
|
||||
|
|
Loading…
Add table
Reference in a new issue