mirror of
https://github.com/git/git.git
synced 2026-03-13 18:33:25 +01:00
Add #ifdef __MINGW32__ in two places
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
@@ -523,8 +523,13 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
|
||||
end = host;
|
||||
|
||||
path = strchr(end, c);
|
||||
#ifdef __MINGW32__
|
||||
/* host must have at least 2 chars to catch DOS C:/path */
|
||||
if (path && path - end > 1) {
|
||||
if (path && path - end > 1)
|
||||
#else
|
||||
if (path)
|
||||
#endif
|
||||
{
|
||||
if (c == ':') {
|
||||
protocol = PROTO_SSH;
|
||||
*path++ = '\0';
|
||||
|
||||
2
path.c
2
path.c
@@ -75,11 +75,13 @@ int git_mkstemp(char *path, size_t len, const char *template)
|
||||
size_t n;
|
||||
|
||||
tmp = getenv("TMPDIR");
|
||||
#ifdef __MINGW32__
|
||||
/* on Windows it is TMP and TEMP */
|
||||
if (!tmp)
|
||||
tmp = getenv("TMP");
|
||||
if (!tmp)
|
||||
tmp = getenv("TEMP");
|
||||
#endif
|
||||
if (!tmp)
|
||||
tmp = "/tmp";
|
||||
n = snprintf(path, len, "%s/%s", tmp, template);
|
||||
|
||||
Reference in New Issue
Block a user