fetchGit/fetchMercurial: Fix directory inclusion check
E.g. the existence of .gitignore would cause .git to be included.
This commit is contained in:
		
							parent
							
								
									6cdaa858d0
								
							
						
					
					
						commit
						d7da6c9ea9
					
				
					 4 changed files with 12 additions and 6 deletions
				
			
		|  | @ -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); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue