diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1998-09-25 10:50:40 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1998-09-25 10:50:40 -0400 |
commit | 652c51a528c2cceab8a4ff02283ae854d0427678 (patch) | |
tree | e0e9b09748c5d361638f64cb5a7dd8815fb94277 /src/LYLocal.c | |
parent | 07e246c51644d9790f2eaf4001ff4ffd40e3274f (diff) | |
download | lynx-snapshots-652c51a528c2cceab8a4ff02283ae854d0427678.tar.gz |
snapshot of project "lynx", label v2-8-1pre_2
Diffstat (limited to 'src/LYLocal.c')
-rw-r--r-- | src/LYLocal.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/LYLocal.c b/src/LYLocal.c index 4490e16c..5750d7ae 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -240,6 +240,7 @@ PRIVATE BOOLEAN ok_stat ARGS2(char *, name, struct stat*, sb) { char tmpbuf[LY_MAXPATH+80]; + CTRACE(tfp, "testing ok_stat(%s)\n", name); if (stat(name, sb) < 0) { sprintf(tmpbuf, "Unable to get status of '%s'.", name); HTAlert(tmpbuf); @@ -253,6 +254,7 @@ PRIVATE BOOLEAN ok_lstat ARGS2(char *, name, struct stat*, sb) { char tmpbuf[LY_MAXPATH+80]; + CTRACE(tfp, "testing ok_lstat(%s)\n", name); if (lstat(name, sb) < 0) { sprintf(tmpbuf, "Unable to get status of '%s'.", name); HTAlert(tmpbuf); @@ -638,7 +640,8 @@ PRIVATE BOOLEAN modify_location ARGS1( /* * Allow ~/ references to the home directory. */ - if (!strncmp(tmpbuf,"~/",2)) { + if (!strncmp(tmpbuf, "~/", 2) + || !strcmp(tmpbuf,"~")) { strcpy(newpath, Home_Dir()); strcat(newpath, (tmpbuf + 1)); strcpy(tmpbuf, newpath); @@ -665,7 +668,7 @@ PRIVATE BOOLEAN modify_location ARGS1( if (!ok_stat(newpath, &dir_info)) { return 0; } - if (S_ISDIR(dir_info.st_mode)) { + if (!S_ISDIR(dir_info.st_mode)) { HTAlert("Destination is not a valid directory! Request denied."); return 0; } |