Skip to content

Commit

Permalink
deps: Fix path fallback edgecase when logging dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Jan 6, 2025
1 parent ade6eb9 commit 4e9821d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/deps.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ static bool build_task(void* data) {

// Log that we're building.

char const* const human = dep->human == NULL ? strrchr(dep->path, '/') + 1 : dep->human;
char const* human = dep->human;

if (human == NULL) {
human = strrchr(dep->path, '/');

if (human++ == NULL) {
human = dep->path;
}
}

pthread_mutex_lock(&logging_lock);
LOG_INFO("%s" CLEAR ": Building dependency...", human);
Expand Down

0 comments on commit 4e9821d

Please sign in to comment.