Skip to content

Commit

Permalink
Normalize paths in amalgamate
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroErrors committed Jul 15, 2023
1 parent 8010fc5 commit 46eed0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/amalgamate/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int amalgamate(
time_t *last_modified,
bool *main_included)
{
char *file = ut_strdup(const_file);
char *file = strreplace(const_file, "/", UT_OS_PS);
ut_path_clean(file, file);
if (ut_rb_find(files_parsed, file)) {
ut_debug("amalgamate: skip '%s' (from '%s:%d')", file,
Expand All @@ -97,7 +97,7 @@ int amalgamate(

/* Get current path from filename (for relative includes) */
char *cur_path = ut_strdup(file);
char *last_elem = strrchr(cur_path, '/');
char *last_elem = strrchr(cur_path, UT_OS_PS[0]);
if (last_elem) {
*last_elem = '\0';
last_elem ++;
Expand Down

0 comments on commit 46eed0f

Please sign in to comment.