From c1c566c2f09a573318dd29cc67483154ca8c1146 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 23 Apr 2018 06:41:07 +0200 Subject: Do not include sibs lib dir in global include --- src/FileUtil.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/FileUtil.cpp b/src/FileUtil.cpp index 7541a61..5ac2641 100644 --- a/src/FileUtil.cpp +++ b/src/FileUtil.cpp @@ -358,8 +358,11 @@ namespace sibs return Result::Err("Failed to open process token"); if (!GetUserProfileDirectory(hToken, &homeDir[0], &homeDirLen)) + { + CloseHandle(hToken); return Result::Err("Failed to get home directory"); - + } + CloseHandle(hToken); homeDir.resize(_tinydir_strlen(homeDir.c_str())); return Result::Ok(homeDir); -- cgit v1.2.3