aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/git.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfetchers/git.cc')
-rw-r--r--src/libfetchers/git.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc
index 07cbc781c..2817fde23 100644
--- a/src/libfetchers/git.cc
+++ b/src/libfetchers/git.cc
@@ -232,7 +232,7 @@ std::pair<StorePath, Input> fetchFromWorkdir(ref<Store> store, Input & input, co
if (S_ISDIR(st.st_mode)) {
auto prefix = file + "/";
auto i = files.lower_bound(prefix);
- return i != files.end() && (*i).starts_with(prefix);
+ return (i != files.end() && (*i).starts_with(prefix)) || files.count(file);
}
return files.count(file);