diff --git a/cmd-source-file.c b/cmd-source-file.c index 38d56d31..67f353b9 100644 --- a/cmd-source-file.c +++ b/cmd-source-file.c @@ -122,6 +122,14 @@ cmd_source_file_done(struct client *c, const char *path, int error, static void cmd_source_file_add(struct cmd_source_file_data *cdata, const char *path) { + char resolved[PATH_MAX]; + + if (realpath(path, resolved) == NULL) { + log_debug("%s: realpath(\"%s\") failed: %s", __func__, + path, strerror(errno)); + } else + path = resolved; + log_debug("%s: %s", __func__, path); cdata->files = xreallocarray(cdata->files, cdata->nfiles + 1, sizeof *cdata->files);