diff --git a/src/backup.py b/src/backup.py index a4be27eb2..bfada89e2 100644 --- a/src/backup.py +++ b/src/backup.py @@ -1513,7 +1513,7 @@ class RestoreManager: operation_logger.extra["env"] = env_dict operation_logger.flush() - manifest = _get_manifest_of_app(app_dir_in_archive) + manifest = _get_manifest_of_app(app_settings_in_archive) if manifest["packaging_format"] >= 2: from yunohost.utils.resources import AppResourceManager try: diff --git a/src/tests/test_backuprestore.py b/src/tests/test_backuprestore.py index 03c3aa0c7..17147f586 100644 --- a/src/tests/test_backuprestore.py +++ b/src/tests/test_backuprestore.py @@ -355,13 +355,13 @@ def test_backup_script_failure_handling(monkeypatch, mocker): @pytest.mark.with_backup_recommended_app_installed def test_backup_not_enough_free_space(monkeypatch, mocker): - def custom_disk_usage(path): + def custom_space_used_by_directory(path, *args, **kwargs): return 99999999999999999 def custom_free_space_in_directory(dirpath): return 0 - monkeypatch.setattr("yunohost.backup.disk_usage", custom_disk_usage) + monkeypatch.setattr("yunohost.backup.space_used_by_directory", custom_space_used_by_directory) monkeypatch.setattr( "yunohost.backup.free_space_in_directory", custom_free_space_in_directory )