diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2023-02-18 12:54:31 -0800 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2023-02-18 13:17:44 -0800 |
commit | 1be70649432afc0dbac4fdd7d3d50d4881f3c634 (patch) | |
tree | f665a976dd37dcd070165b71c2e1eac29af60b45 /src/libgit2 | |
parent | 795758d2ada5b4760664050230343920eab528f6 (diff) | |
download | libgit2-1be70649432afc0dbac4fdd7d3d50d4881f3c634.tar.gz |
repo: don't fail on strange win32 paths
With some paths on Win32, we cannot identify the owner because it's on a
file share (WSL2 or UNC). In that case, don't fail, but identify that
the current user does not own the path. This matches Git for Windows
behavior.
Diffstat (limited to 'src/libgit2')
-rw-r--r-- | src/libgit2/repository.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libgit2/repository.c b/src/libgit2/repository.c index 489d627a0..c02662bda 100644 --- a/src/libgit2/repository.c +++ b/src/libgit2/repository.c @@ -547,6 +547,9 @@ static int validate_ownership_path(bool *is_safe, const char *path) if (error == GIT_ENOTFOUND) { *is_safe = true; error = 0; + } else if (error == GIT_EINVALID) { + *is_safe = false; + error = 0; } return error; |