rpms/mc/devel mc-tmpcrash.patch,NONE,1.1 mc.spec,1.111,1.112

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Nov 27 09:50:03 UTC 2006


Author: jnovy

Update of /cvs/dist/rpms/mc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv20465

Modified Files:
	mc.spec 
Added Files:
	mc-tmpcrash.patch 
Log Message:
- don't crash when temporary directory cannot be created (#217342)
Resolves: #217342


mc-tmpcrash.patch:
 utilunix.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

--- NEW FILE mc-tmpcrash.patch ---
--- mc-2006-11-14-16/src/utilunix.c.tmpcrash	2005-07-27 17:03:25.000000000 +0200
+++ mc-2006-11-14-16/src/utilunix.c	2006-11-27 10:32:54.000000000 +0100
@@ -274,9 +274,12 @@
 	/* Need to create directory */
 	if (mkdir (buffer, S_IRWXU) != 0) {
 	    fprintf (stderr,
-		     _("Cannot create temporary directory %s: %s\n"),
-		     buffer, unix_error_string (errno));
-	    error = "";
+		     _("Cannot create temporary directory %s: %s\n%s%s\n"),
+		     buffer, unix_error_string (errno), 
+		     _("Temporary files will not be created\n"),
+		     _("Press any key to continue..."));
+	    getc (stdin);
+	    return "/dev/null/";
 	}
     }
 


Index: mc.spec
===================================================================
RCS file: /cvs/dist/rpms/mc/devel/mc.spec,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- mc.spec	20 Nov 2006 14:08:49 -0000	1.111
+++ mc.spec	27 Nov 2006 09:50:00 -0000	1.112
@@ -3,7 +3,7 @@
 Summary:	User-friendly text console file manager and visual shell
 Name:		mc
 Version:	4.6.1a
-Release:	35%{?dist}
+Release:	36%{?dist}
 Epoch:		1
 License:	GPL
 Group:		System Environment/Shells
@@ -27,6 +27,7 @@
 Patch11:	mc-utf8-8bit-hex.patch
 Patch12:	mc-ipv6.patch
 Patch13:	mc-newlinedir.patch
+Patch14:	mc-tmpcrash.patch
 
 %description
 Midnight Commander is a visual shell much like a file manager, only
@@ -52,6 +53,7 @@
 %patch11 -p1 -b .8bit-hex
 %patch12 -p1 -b .ipv6
 %patch13 -p1 -b .newlinedir
+%patch14 -p1 -b .tmpcrash
 
 # convert files in /lib to UTF-8
 pushd lib
@@ -196,6 +198,9 @@
 %dir %{_sysconfdir}/mc
 
 %changelog
+* Thu Nov 27 2006 Jindrich Novy <jnovy at redhat.com> 4.6.1a-36
+- don't crash when temporary directory cannot be created (#217342)
+
 * Thu Nov 16 2006 Jindrich Novy <jnovy at redhat.com> 4.6.1a-35
 - update to new CVS snapshot
 - drop .fishfix, .rpmconf patches, applied upstream




More information about the fedora-cvs-commits mailing list