rpms/mc/devel mc-showfree.patch,1.2,1.3

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Jan 2 13:22:40 UTC 2006


Author: jnovy

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

Modified Files:
	mc-showfree.patch 
Log Message:
minor correction of showfree patch


mc-showfree.patch:
 screen.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+)

Index: mc-showfree.patch
===================================================================
RCS file: /cvs/dist/rpms/mc/devel/mc-showfree.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mc-showfree.patch	29 Dec 2005 19:32:05 -0000	1.2
+++ mc-showfree.patch	2 Jan 2006 13:22:35 -0000	1.3
@@ -1,5 +1,5 @@
---- mc-4.6.1a/src/screen.c.showfree	2005-12-28 16:49:52.000000000 +0100
-+++ mc-4.6.1a/src/screen.c	2005-12-28 17:14:45.000000000 +0100
+--- mc-4.6.1a/src/screen.c.showfree	2006-01-02 12:22:51.000000000 +0100
++++ mc-4.6.1a/src/screen.c	2006-01-02 13:44:05.000000000 +0100
 @@ -49,6 +49,7 @@
  #define WANT_WIDGETS
  #include "main.h"		/* the_menubar */
@@ -32,12 +32,12 @@
 +    struct stat st;
 +
 +    /* Don't try to stat non-local fs */
-+    if (strlen(panel->cwd) >= 2 && panel->cwd[0] == '/' && panel->cwd[1] == '#')
++    if (!vfs_file_is_local(panel->cwd))
 +	return;
 +
-+    if (old_cwd == NULL || strcmp(old_cwd, panel->cwd)) {
++    if (old_cwd == NULL || strcmp(old_cwd, panel->cwd) == 0) {
 +	init_my_statfs();
-+	if (old_cwd != NULL) g_free(old_cwd);
++	g_free(old_cwd);
 +	old_cwd = g_strdup(panel->cwd);
 +    }
 +
@@ -48,7 +48,7 @@
 +	char buffer1 [6], buffer2[6], *tmp;
 +	size_trunc_len (buffer1, 5, myfs_stats.avail, 1);
 +	size_trunc_len (buffer2, 5, myfs_stats.total, 1);
-+	tmp = g_strdup_printf (_("%s (%d%%) of %s"), buffer1, myfs_stats.total ?
++	tmp = g_strdup_printf (_("%s (%d%%) of %s"), buffer1, myfs_stats.total > 0 ?
 +			       (int)(100 * (double)myfs_stats.avail / myfs_stats.total) : 0,
 +			       buffer2);
 +	widget_move (&panel->widget, panel->widget.lines-3, panel->widget.cols-2-strlen(tmp));




More information about the fedora-cvs-commits mailing list