From 689181da20305b3142be0963c30d05b8752968e1 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 3 Dec 2023 17:01:59 +0800 Subject: [PATCH] Skip existent files --- WeChatFerry/spy/funcs.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index ca6ccd3..8a4fe89 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -180,6 +180,11 @@ int DownloadAttach(uint64_t id, string thumb, string extra) int status = -1; uint64_t localId; uint32_t dbIdx; + + if (fs::exists(extra)) { // 第一道,不重复下载 + return 0; + } + if (GetLocalIdandDbidx(id, &localId, &dbIdx) != 0) { LOG_ERROR("Failed to get localId, Please check id: {}", to_string(id)); return status;