fix #285 .spiceinit cannot be read in from home directory

reported by Craggan in bug report #285
http://sourceforge.net/p/ngspice/bugs/285/
This commit is contained in:
rlar 2014-06-05 20:17:51 +02:00
parent 6dc5f12914
commit 22b2349893
2 changed files with 2 additions and 2 deletions

View File

@ -610,7 +610,7 @@ ngSpice_Init(SendChar* printfcn, SendStat* statusfcn, ControlledExit* ngspiceexi
struct passwd *pw; struct passwd *pw;
pw = getpwuid(getuid()); pw = getpwuid(getuid());
s = tprintf("%s%s", pw->pw_dir, INITSTR); s = tprintf("%s" DIR_PATHSEP "%s", pw->pw_dir, INITSTR);
if (access(s, 0) == 0) if (access(s, 0) == 0)
inp_source(s); inp_source(s);

View File

@ -2522,7 +2522,7 @@ Spice_Init(Tcl_Interp *interp)
struct passwd *pw; struct passwd *pw;
pw = getpwuid(getuid()); pw = getpwuid(getuid());
s = tprintf("%s%s", pw->pw_dir, INITSTR); s = tprintf("%s" DIR_PATHSEP "%s", pw->pw_dir, INITSTR);
if (access(s, 0) == 0) if (access(s, 0) == 0)
inp_source(s); inp_source(s);