diff options
Diffstat (limited to 'src/libexpr/primops/fetchGit.cc')
-rw-r--r-- | src/libexpr/primops/fetchGit.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libexpr/primops/fetchGit.cc b/src/libexpr/primops/fetchGit.cc index bca68ed72091..fd3e84c292c3 100644 --- a/src/libexpr/primops/fetchGit.cc +++ b/src/libexpr/primops/fetchGit.cc @@ -56,8 +56,9 @@ GitInfo exportGit(ref<Store> store, const std::string & uri, auto st = lstat(p); if (S_ISDIR(st.st_mode)) { - auto i = files.lower_bound(file); - return i != files.end() && hasPrefix(*i, file); + auto prefix = file + "/"; + auto i = files.lower_bound(prefix); + return i != files.end() && hasPrefix(*i, prefix); } return files.count(file); |