--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: emelfm: du plugin needs to handle larger data sets (with patch)
- From: Josh Malone <jmalone@ubergeeks.com>
- Date: Mon, 29 Nov 2004 11:54:48 -0500
- Message-id: <E1CYona-0007BR-00@pop-a065c28.pas.sa.earthlink.net>
Package: emelfm
Version: 0.9.2-7
Severity: normal
Tags: patch
The disk usage plugin only uses a gint to hold the total size. It
cannot handle large data sets (such as those big enough to fill a DVD).
patch:
--- du.c-orig 2000-11-17 01:27:04.000000000 -0500
+++ du.c 2004-11-29 11:47:27.000000000 -0500
@@ -26,7 +26,7 @@
#include "../emelfm.h"
static void
-add_disk_usage(gchar *filename, gint *total, gint *files, gint *dirs)
+add_disk_usage(gchar *filename, gulong *total, gint *files, gint *dirs)
{
struct stat statbuf;
@@ -82,7 +82,8 @@
{
GList *base, *tmp;
FileInfo *info;
- gint total = 0, files = 0, dirs = 0;
+ gulong total = 0;
+ gint files = 0, dirs = 0;
GString *text;
base = tmp = get_selection(curr_view);
@@ -94,7 +95,7 @@
text = g_string_new("Total Size: ");
if (total < 10240) /* less than 10K */
- g_string_sprintfa(text, "%d bytes\n", total);
+ g_string_sprintfa(text, "%ld bytes\n", total);
else if (total < 1048576) /* less than a meg */
g_string_sprintfa(text, "%.2f Kbytes\n", (total / 1024.0));
else
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.27
Locale: LANG=C, LC_CTYPE=C
Versions of packages emelfm depends on:
ii libc6 2.3.2.ds1-16 GNU C Library: Shared libraries an
ii libglib1.2 1.2.10-9 The GLib library of C routines
ii libgtk1.2 1.2.10-17 The GIMP Toolkit set of widgets fo
ii libx11-6 4.3.0.dfsg.1-4 X Window System protocol client li
ii libxext6 4.3.0.dfsg.1-4 X Window System miscellaneous exte
ii libxi6 4.3.0.dfsg.1-4 X Window System Input extension li
ii xlibs 4.3.0.dfsg.1-4 X Window System client libraries m
-- no debconf information
--- End Message ---