[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev [PATCH][dev17] Print current dir in download page
From: |
Leonid Pauzner |
Subject: |
Re: lynx-dev [PATCH][dev17] Print current dir in download page |
Date: |
Thu, 25 Feb 1999 13:24:23 +0300 (MSK) |
24-Feb-99 13:26 John Bley wrote:
> Sometimes after starting lynx and browsing for a while, I go to download
> something and forget where I was when I started. It'd be handy if lynx
> told me where I was so that I could save some typing.
What was this patch intended for?
you want to know the dir where lynx saves downloads?
it is in lynx_save_space variable (configurable from lynx.cfg),
defaulted to current dir. And this info should be hidden from anonymous users.
It may be useful to build a log file for all files downloaded by lynx instead.
> --
> John Bley - address@hidden
> Duke '99 - English/Computer Science
> Since English is a mess, it maps well onto the problem space,
> which is also a mess, which we call reality. - Larry Wall
> diff -Burp lynx2-8-2/src/LYDownload.c lynx2-8-2-patched/src/LYDownload.c
> --- lynx2-8-2/src/LYDownload.c Thu Jan 28 11:31:29 1999
> +++ lynx2-8-2-patched/src/LYDownload.c Wed Feb 24 13:19:23 1999
> @@ -473,6 +473,7 @@ PUBLIC int LYdownload_options ARGS2(
> char *, data_file)
> {
> static char tempfile[LY_MAXPATH];
> + static char curdir[LY_MAXPATH];
> char *downloaded_url = NULL;
> char *sug_filename = NULL;
> FILE *fp0;
> @@ -506,7 +507,14 @@ PUBLIC int LYdownload_options ARGS2(
> gettext("Downloaded link:"),
> downloaded_url);
> FREE(downloaded_url);
> -
> +#if HAVE_GETCWD
> + getcwd (curdir, sizeof(curdir));
> +#else
> + getwd (curdir);
> +#endif /* NO_GETCWD */
> + fprintf(fp0, "<em>%s</em> %s\n",
> + gettext("Current directory:"),
> + curdir);
> fprintf(fp0, "<em>%s</em> %s\n",
> gettext("Suggested file name:"),
> sug_filename);