mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* utilunix.c (mc_tmpdir): Don't exit if the temporary directory
cannot be created - it should be possible to run mc on read-only filesystems. Try to chmod() the temporary directory.
This commit is contained in:
parent
e55c720591
commit
69dd1ca00c
@ -1,3 +1,9 @@
|
||||
2002-10-20 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* utilunix.c (mc_tmpdir): Don't exit if the temporary directory
|
||||
cannot be created - it should be possible to run mc on read-only
|
||||
filesystems. Try to chmod() the temporary directory.
|
||||
|
||||
2002-10-17 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* man2hlp.c (handle_tp_ip): Implement .IP and .TP macroses
|
||||
|
2
src/TODO
2
src/TODO
@ -11,8 +11,6 @@ Crash on circular macro definitions in the editor.
|
||||
Add minimal UTF-8 support on Red Hat 8.0 to fix the frames or disable
|
||||
support for S-Lang library compiled with UTF-8 support.
|
||||
|
||||
REGRESSION: Allow minimal functionality on read-only filesystems.
|
||||
|
||||
Don't rely on temporary scripts being executable. Run shell explicitly.
|
||||
|
||||
reimplement "-P" in a safer way (temp file instead of stdout) - possibly
|
||||
|
@ -324,11 +324,14 @@ mc_tmpdir (void)
|
||||
pwd->pw_name);
|
||||
canonicalize_pathname (tmpdir);
|
||||
|
||||
/* No recursion or VFS here. If $TMPDIR is missing, exit. */
|
||||
if (mkdir (tmpdir, 0700) != 0 && errno != EEXIST) {
|
||||
fprintf (stderr, _("Cannot create temporary directory %s: %s\n"),
|
||||
tmpdir, unix_error_string (errno));
|
||||
exit (1);
|
||||
if (chmod (tmpdir, S_IRWXU) != 0) {
|
||||
/* Need to create directory. */
|
||||
if (mkdir (tmpdir, S_IRWXU) != 0) {
|
||||
fprintf (stderr,
|
||||
_("Cannot create temporary directory %s: %s\n"),
|
||||
tmpdir, unix_error_string (errno));
|
||||
g_snprintf (tmpdir, sizeof (tmpdir), sys_tmp);
|
||||
}
|
||||
}
|
||||
|
||||
return tmpdir;
|
||||
|
Loading…
Reference in New Issue
Block a user