Skip to content

Commit d4d0045

Browse files
committed
fixup! fscache: implement an FSCache-aware is_mount_point()
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 69fc26c commit d4d0045

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

compat/win32/fscache.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,8 @@ int fscache_lstat(const char *filename, struct stat *st)
620620
int fscache_is_mount_point(struct strbuf *path)
621621
{
622622
int dirlen, base, len;
623-
struct fsentry key[2], *fse;
623+
struct heap_fsentry key[2];
624+
struct fsentry *fse;
624625
struct fscache *cache = fscache_getcache();
625626

626627
if (!cache || !do_fscache_enabled(cache, path->buf))
@@ -637,9 +638,9 @@ int fscache_is_mount_point(struct strbuf *path)
637638
dirlen = base ? base - 1 : 0;
638639

639640
/* lookup entry for path + name in cache */
640-
fsentry_init(key, NULL, path->buf, dirlen);
641-
fsentry_init(key + 1, key, path->buf + base, len - base);
642-
fse = fscache_get(cache, key + 1);
641+
fsentry_init(&key[0].ent, NULL, path->buf, dirlen);
642+
fsentry_init(&key[1].ent, &key[0].ent, path->buf + base, len - base);
643+
fse = fscache_get(cache, &key[1].ent);
643644
if (!fse)
644645
return mingw_is_mount_point(path);
645646
return fse->reparse_tag == IO_REPARSE_TAG_MOUNT_POINT;

0 commit comments

Comments
 (0)