summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/fileops.c b/src/fileops.c
index 1f58fa5cd..db53d4fce 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -627,6 +627,20 @@ static git_futils_dirs_guess_cb git_futils__dir_guess[GIT_FUTILS_DIR__MAX] = {
git_futils_guess_xdg_dirs,
};
+int git_futils_dirs_global_init(void)
+{
+ git_futils_dir_t i;
+ git_buf *path;
+ int error = 0;
+
+ for (i = 0; i < GIT_FUTILS_DIR__MAX; i++) {
+ if ((error = git_futils_dirs_get(&path, i)) < 0)
+ break;
+ }
+
+ return error;
+}
+
static int git_futils_check_selector(git_futils_dir_t which)
{
if (which < GIT_FUTILS_DIR__MAX)