summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-03-20 14:28:25 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2021-04-28 13:03:33 +0100
commitdbc03de479eec4f96ce3273bf76f49daccbeb496 (patch)
tree0ada4cf3ec1b92175b20d7be13082d1b468eba97 /src
parentdc1ba018289aa40e1948a5fbb673652f86170677 (diff)
downloadlibgit2-dbc03de479eec4f96ce3273bf76f49daccbeb496.tar.gz
apply: ensure we validate paths
There was no test ensuring that we validate `.git` paths. We do, but let's add a test to make sure that we never regress this.
Diffstat (limited to 'src')
-rw-r--r--src/path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path.c b/src/path.c
index a4c289e16..50a0b468c 100644
--- a/src/path.c
+++ b/src/path.c
@@ -1923,7 +1923,7 @@ GIT_INLINE(bool) should_validate_longpaths(git_repository *repo)
int git_path_validate_workdir(git_repository *repo, const char *path)
{
if (should_validate_longpaths(repo))
- return git_path_validate_ondisk(path, strlen(path));
+ return git_path_validate_filesystem(path, strlen(path));
return 0;
}
@@ -1934,7 +1934,7 @@ int git_path_validate_workdir_with_len(
size_t path_len)
{
if (should_validate_longpaths(repo))
- return git_path_validate_ondisk(path, path_len);
+ return git_path_validate_filesystem(path, path_len);
return 0;
}