From aabe9359330b0223d842344d45248b50efaf0964 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Sat, 20 Jul 2024 16:44:29 +0800 Subject: [PATCH] Fix handle closed twice --- game_backuper/cfapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game_backuper/cfapi.py b/game_backuper/cfapi.py index 4ad1cdc..4d7c598 100644 --- a/game_backuper/cfapi.py +++ b/game_backuper/cfapi.py @@ -91,9 +91,9 @@ def hydrate_file(s: str): CfHydratePlaceholder(h, 0, -1, 0, LPVOID()) except OSError as e: if GetLastError() != ERROR_INVALID_FUNCTION: - CfCloseHandle(h) # File is not cloud file if e.winerror != -2147024520: + CfCloseHandle(h) raise e CfCloseHandle(h)