__unix__: do simple tilde subst ( ~/ --> /home/user) just in case this was not done by the shell
This commit is contained in:
parent
5706b12ad9
commit
73bab32aa9
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue