aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-04-23 06:41:07 +0200
committerdec05eba <dec05eba@protonmail.com>2018-04-23 06:41:10 +0200
commitc1c566c2f09a573318dd29cc67483154ca8c1146 (patch)
tree8efcb8cc9011daf0dba9685702fb9d1f1b931f8c /src
parentd9f0e34a8dbbdbfc93162f0297ff9330b86d3c01 (diff)
Do not include sibs lib dir in global include
Diffstat (limited to 'src')
-rw-r--r--src/FileUtil.cpp5
1 files changed, 4 insertions, 1 deletions
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<FileString>::Err("Failed to open process token");
if (!GetUserProfileDirectory(hToken, &homeDir[0], &homeDirLen))
+ {
+ CloseHandle(hToken);
return Result<FileString>::Err("Failed to get home directory");
-
+ }
+
CloseHandle(hToken);
homeDir.resize(_tinydir_strlen(homeDir.c_str()));
return Result<FileString>::Ok(homeDir);