summaryrefslogtreecommitdiffstats
path: root/git-access.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2015-02-15 11:55:52 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-15 13:33:44 -0800
commitfdd40d3c6a7f92b1df167081bdd107041eb998ce (patch)
treeb3284aa82cce626ed6fd4d451bf4427dda0a43c8 /git-access.c
parent08567c4a92bec3aa9c9caa6c142035b3f98ae280 (diff)
downloadsubsurface-fdd40d3c6a7f92b1df167081bdd107041eb998ce.tar.gz
Remove unnecessary use of non-portable 'mkdir()'
This fixes the problem with Windows being the usual non-POSIX PoS that it is.. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'git-access.c')
-rw-r--r--git-access.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/git-access.c b/git-access.c
index c39e7efb3..99dfe3766 100644
--- a/git-access.c
+++ b/git-access.c
@@ -23,18 +23,6 @@
#define git_remote_fetch(remote, refspecs, signature, reflog) git_remote_fetch(remote, signature, reflog)
#endif
-static const char *system_git_dir(void)
-{
- static char pathname[PATH_MAX];
-
- if (!*pathname) {
- // This doesn't work on Windows, crap that it is. Somebody needs to fix it.
- snprintf(pathname, PATH_MAX, "%s/git-caches", system_default_directory());
- mkdir(pathname, 0777);
- }
- return pathname;
-}
-
static char *get_local_dir(const char *remote, const char *branch)
{
SHA_CTX ctx;
@@ -49,7 +37,7 @@ static char *get_local_dir(const char *remote, const char *branch)
SHA1_Final(hash, &ctx);
return format_string("%s/%02x%02x%02x%02x%02x%02x%02x%02x",
- system_git_dir(),
+ system_default_directory(),
hash[0], hash[1], hash[2], hash[3],
hash[4], hash[5], hash[6], hash[7]);
}