From 039cfd19ce806e43a3459edd1789c142607e9381 Mon Sep 17 00:00:00 2001 From: pcpa Date: Thu, 24 May 2012 15:29:01 -0300 Subject: [PATCH 3/4] Use proper pointer when computing "realpath" of a new file. In some special conditions it previously could omit a slash, and instead of creating foo/bar/baz would create foo/barbaz. Signed-off-by: pcpa --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.c b/util.c index f65bf4d..2378b40 100644 --- a/util.c +++ b/util.c @@ -522,7 +522,7 @@ ResolveName(char *filename) int length = strlen(result); XmuSnprintf(result + length, BUFSIZ - length, "%s%s", - dir[length - 1] == '/' ? "" : "/", file); + result[length - 1] == '/' ? "" : "/", file); } XtFree(tmp); -- 1.7.9.2