better cmdline filename path parsing

This commit is contained in:
Stefan Frederik 2020-12-01 13:25:00 +01:00
parent 2bd8a93889
commit 08e179e588
1 changed files with 2 additions and 1 deletions

View File

@ -1505,8 +1505,9 @@ int Tcl_AppInit(Tcl_Interp *inter)
#ifdef __unix__
if(filename[0] == '~' && filename[1] == '/') {
here();
my_snprintf(f, S(f), "%s%s", home_dir, filename + 1);
} else if(filename[0] == '.' && filename[1] == '/') {
my_snprintf(f, S(f), "%s%s", pwd_dir, filename + 1);
} else if(filename[0] !='/') {
my_snprintf(f, S(f), "%s/%s", pwd_dir, filename);
} else {