summaryrefslogtreecommitdiff
path: root/src/global.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2013-07-11 17:09:15 -0500
committerEdward Thomson <ethomson@microsoft.com>2013-07-11 17:17:53 -0500
commit0a1c8f55b35ebd35a7d267099257634483268ffd (patch)
tree35f35ddc8347354c0a8ffa526b38b824da07b1dc /src/global.c
parentf2de67d589e4fde3378f531c782cbe176cb65f36 (diff)
downloadlibgit2-0a1c8f55b35ebd35a7d267099257634483268ffd.tar.gz
preload configuration paths
Diffstat (limited to 'src/global.c')
-rw-r--r--src/global.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/global.c b/src/global.c
index 2d40ca2fc..a06d0c81f 100644
--- a/src/global.c
+++ b/src/global.c
@@ -65,10 +65,8 @@ int git_threads_init(void)
return -1;
/* Initialize any other subsystems that have global state */
- if ((error = git_hash_global_init()) >= 0)
- _tls_init = 1;
-
- if (error == 0)
+ if ((error = git_hash_global_init()) >= 0 &&
+ (error = git_futils_dirs_global_init()) >= 0)
_tls_init = 1;
GIT_MEMORY_BARRIER;
@@ -127,7 +125,8 @@ int git_threads_init(void)
pthread_key_create(&_tls_key, &cb__free_status);
/* Initialize any other subsystems that have global state */
- if ((error = git_hash_global_init()) >= 0)
+ if ((error = git_hash_global_init()) >= 0 &&
+ (error = git_futils_dirs_global_init()) >= 0)
_tls_init = 1;
GIT_MEMORY_BARRIER;