From fecb16128337c0be78bacee4602ca813d659a0ed Mon Sep 17 00:00:00 2001 From: "Andrew V. Samoilov" Date: Wed, 18 Aug 2004 20:34:01 +0000 Subject: [PATCH] x.c (mc_tmpdir): Fix typos in comment. Set MC_TMPDIR environment variable for vfs scripts. Clear error after successful test of mc temp dir. --- src/ChangeLog | 6 ++++++ src/utilunix.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7d9b50912..13da3292f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2004-08-19 Pavel Shirshov + * utilunix.c (mc_tmpdir): Fix typos in comment. + Set MC_TMPDIR environment variable for vfs scripts. + Clear error after successful test of mc temp dir. + +2004-08-19 Pavel Shirshov + * screen.c (paint_frame): Fix possible buffer overflow. 2004-08-18 Pavel Shirshov diff --git a/src/utilunix.c b/src/utilunix.c index 5587cc98a..9b5f837d2 100644 --- a/src/utilunix.c +++ b/src/utilunix.c @@ -298,7 +298,7 @@ tilde_expand (const char *directory) /* * Return the directory where mc should keep its temporary files. - * This directory is (in Bourne shell terms) "${TMPDIR=/tmp}-$USER" + * This directory is (in Bourne shell terms) "${TMPDIR=/tmp}/mc-$USER" * When called the first time, the directory is created if needed. * The first call should be done early, since we are using fprintf() * and not message() to report possible problems. @@ -378,6 +378,7 @@ mc_tmpdir (void) if (fallback_ok) { fprintf (stderr, _("Temporary files will be created in %s\n"), sys_tmp); + error = NULL; } else { fprintf (stderr, _("Temporary files will not be created\n")); tmpdir = "/dev/null/"; @@ -387,6 +388,9 @@ mc_tmpdir (void) getc (stdin); } + if (!error) + setenv ("MC_TMPDIR", tmpdir, 1); + return tmpdir; } -- 2.11.4.GIT