Skip to content

Commit 7a4bc7a

Browse files
committed
COMMON: Fixes for unit case sensitivity
1 parent f1250b7 commit 7a4bc7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/common/proc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ int sys_search_path(const char *path, const char *file, char *retbuf) {
8383
struct dirent *entry;
8484
while (!found && (entry = readdir(dp)) != NULL) {
8585
if (strcasecmp(entry->d_name, file) == 0) {
86+
int end = strlen(cur_path);
8687
#if defined(_UnixOS)
8788
strcat(cur_path, "/");
8889
#else
@@ -94,6 +95,8 @@ int sys_search_path(const char *path, const char *file, char *retbuf) {
9495
strcpy(retbuf, cur_path);
9596
}
9697
found = 1;
98+
} else {
99+
cur_path[end] = '\0';
97100
}
98101
}
99102
}

0 commit comments

Comments
 (0)