mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-06 18:46:49 +00:00
Fix bug in repo detection
This commit is contained in:
parent
3570810516
commit
ffd9d4eb59
1 changed files with 1 additions and 1 deletions
|
@ -1492,7 +1492,7 @@ impl LocalSnapshot {
|
||||||
let mut current_candidate = None;
|
let mut current_candidate = None;
|
||||||
for (work_directory, repo) in (&self.repository_entries).iter() {
|
for (work_directory, repo) in (&self.repository_entries).iter() {
|
||||||
if work_directory.contains(path) {
|
if work_directory.contains(path) {
|
||||||
if work_directory.0.as_os_str().len() > max_len {
|
if work_directory.0.as_os_str().len() >= max_len {
|
||||||
current_candidate = Some(repo);
|
current_candidate = Some(repo);
|
||||||
max_len = work_directory.0.as_os_str().len();
|
max_len = work_directory.0.as_os_str().len();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue