mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-29 08:03:45 +00:00
Fix some incorrect MSVC #ifdef's. Fixes #1305
This commit is contained in:
parent
a150cc875d
commit
8c29dca6c3
@ -400,7 +400,7 @@ int git_path_fromurl(git_buf *local_path_out, const char *file_url)
|
||||
if (offset >= len || file_url[offset] == '/')
|
||||
return error_invalid_local_file_uri(file_url);
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#ifndef GIT_WIN32
|
||||
offset--; /* A *nix absolute path starts with a forward slash */
|
||||
#endif
|
||||
|
||||
|
||||
@ -238,7 +238,7 @@ const char* cl_git_path_url(const char *path)
|
||||
cl_git_pass(git_path_prettify_dir(&path_buf, path, NULL));
|
||||
cl_git_pass(git_buf_puts(&url_buf, "file://"));
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef GIT_WIN32
|
||||
/*
|
||||
* A FILE uri matches the following format: file://[host]/path
|
||||
* where "host" can be empty and "path" is an absolute path to the resource.
|
||||
|
||||
@ -324,7 +324,7 @@ static void check_fromurl(const char *expected_result, const char *input, int sh
|
||||
git_buf_free(&buf);
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef GIT_WIN32
|
||||
#define ABS_PATH_MARKER ""
|
||||
#else
|
||||
#define ABS_PATH_MARKER "/"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user