diff options
Diffstat (limited to 'src/repository.c')
| -rw-r--r-- | src/repository.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/repository.c b/src/repository.c index 6b2705bfa..8daa04d5d 100644 --- a/src/repository.c +++ b/src/repository.c @@ -27,6 +27,10 @@ #include "merge.h" #include "diff_driver.h" +#ifdef GIT_WIN32 +# include "win32/w32_util.h" +#endif + #define GIT_FILE_CONTENT_PREFIX "gitdir:" #define GIT_BRANCH_MASTER "master" @@ -1149,7 +1153,7 @@ static int repo_write_template( #ifdef GIT_WIN32 if (!error && hidden) { - if (p_hide_directory__w32(path.ptr) < 0) + if (git_win32__sethidden(path.ptr) < 0) error = -1; } #else @@ -1234,8 +1238,8 @@ static int repo_init_structure( /* Hide the ".git" directory */ #ifdef GIT_WIN32 if ((opts->flags & GIT_REPOSITORY_INIT__HAS_DOTGIT) != 0) { - if (p_hide_directory__w32(repo_dir) < 0) { - giterr_set(GITERR_REPOSITORY, + if (git_win32__sethidden(repo_dir) < 0) { + giterr_set(GITERR_OS, "Failed to mark Git repository folder as hidden"); return -1; } |
