Re: Alternates corruption issue
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> @@ -324,8 +324,11 @@ const char *enter_repo(const char *path, int strict)
> return NULL;
> len = strlen(used_path);
> for (i = 0; suffix[i]; i++) {
> + struct stat st;
> strcpy(used_path + len, suffix[i]);
> - if (!access(used_path, F_OK)) {
> + if (!stat(used_path, &st) &&
> + (S_ISREG(st.st_mode) ||
> + (S_ISDIR(st.st_mode) && is_git_directory(used_path)))) {Hmm, how would this change interact with
> strcat(validated_path, suffix[i]);
> break;
> }
gitfile = read_gitfile(used_path);
that appear after the context in the patch?