Re: "Cannot create temporary command file" error



Dmitry Semyonov wrote:
mc_tmpdir() function you are patching has the following comment:

 * The first call should be done early, since we are using fprintf()
 * and not message() to report possible problems.

So, in our case, a user will see some garbage on the screen if the mc-*
directory does not exist and can not be created.

well, it could at least try to create the directory, with no complaints if it fails.

--
Jindrich Makovicka
Index: utilunix.c
===================================================================
RCS file: /cvs/gnome/mc/src/utilunix.c,v
retrieving revision 1.57
diff -u -b -B -r1.57 utilunix.c
--- utilunix.c	10 Mar 2003 06:52:57 -0000	1.57
+++ utilunix.c	19 May 2003 13:03:54 -0000
@@ -314,8 +314,12 @@
     const char *error = NULL;
 
     /* Check if already initialized */
-    if (tmpdir)
+    if (tmpdir) {
+	if (lstat (tmpdir, &st) != 0) {
+	    mkdir (tmpdir, S_IRWXU);
+	}
 	return tmpdir;
+    }
 
     sys_tmp = getenv ("TMPDIR");
     if (!sys_tmp) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]