mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
08567c4a92
commit
fdd40d3c6a
1 changed files with 1 additions and 13 deletions
14
git-access.c
14
git-access.c
|
@ -23,18 +23,6 @@
|
||||||
#define git_remote_fetch(remote, refspecs, signature, reflog) git_remote_fetch(remote, signature, reflog)
|
#define git_remote_fetch(remote, refspecs, signature, reflog) git_remote_fetch(remote, signature, reflog)
|
||||||
#endif
|
#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)
|
static char *get_local_dir(const char *remote, const char *branch)
|
||||||
{
|
{
|
||||||
SHA_CTX ctx;
|
SHA_CTX ctx;
|
||||||
|
@ -49,7 +37,7 @@ static char *get_local_dir(const char *remote, const char *branch)
|
||||||
SHA1_Final(hash, &ctx);
|
SHA1_Final(hash, &ctx);
|
||||||
|
|
||||||
return format_string("%s/%02x%02x%02x%02x%02x%02x%02x%02x",
|
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[0], hash[1], hash[2], hash[3],
|
||||||
hash[4], hash[5], hash[6], hash[7]);
|
hash[4], hash[5], hash[6], hash[7]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue