From 73bab32aa9b821e6bc4407ee80b423e967172ad3 Mon Sep 17 00:00:00 2001 From: Stefan Schippers Date: Tue, 27 Oct 2020 22:56:53 +0100 Subject: [PATCH] __unix__: do simple tilde subst ( ~/ --> /home/user) just in case this was not done by the shell --- src/xinit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xinit.c b/src/xinit.c index 69fa9e3e..9835e481 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -1446,7 +1446,10 @@ int Tcl_AppInit(Tcl_Interp *inter) char f[PATH_MAX]; #ifdef __unix__ - if(filename[0] !='/') { + if(filename[0] == '~' && filename[1] == '/') { + here(); + my_snprintf(f, S(f), "%s%s", home_dir, filename + 1); + } else if(filename[0] !='/') { my_snprintf(f, S(f), "%s/%s", pwd_dir, filename); } else { my_snprintf(f, S(f), "%s", filename);