From d35312d33f95a0250ccfac1f9a58729fb16f287f Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Tue, 13 Apr 2021 12:09:13 +0200 Subject: api: log Windows error message too when creating folder or file fails Signed-off-by: Simon Rozman --- api/adapter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/adapter.c b/api/adapter.c index 8fc757e..47809f4 100644 --- a/api/adapter.c +++ b/api/adapter.c @@ -1306,7 +1306,7 @@ static _Return_type_success_(return != FALSE) BOOL SelectDriver( WCHAR RandomTempSubDirectory[MAX_PATH]; if (!CreateTemporaryDirectory(RandomTempSubDirectory)) { - LastError = LOG(WINTUN_LOG_ERR, L"Failed to create temporary folder %s", RandomTempSubDirectory); + LastError = LOG_LAST_ERROR(L"Failed to create temporary folder %s", RandomTempSubDirectory); goto cleanupExistingAdapters; } @@ -1330,7 +1330,7 @@ static _Return_type_success_(return != FALSE) BOOL SelectDriver( !ResourceCopyToFile(SysPath, UseWHQL ? L"wintun-whql.sys" : L"wintun.sys") || !ResourceCopyToFile(InfPath, UseWHQL ? L"wintun-whql.inf" : L"wintun.inf")) { - LastError = LOG(WINTUN_LOG_ERR, L"Failed to extract driver"); + LastError = LOG_LAST_ERROR(L"Failed to extract driver"); goto cleanupDelete; } LOG(WINTUN_LOG_INFO, L"Installing driver"); -- cgit v1.2.3-59-g8ed1b