From b7735c9c1bf6beda1c17f78111702c31ea97c65c Mon Sep 17 00:00:00 2001 From: Stephen Watson Date: Sat, 26 Jun 2004 15:28:04 +0000 Subject: [PATCH] r3561: Another Properties window fix: if there is no output from the du command then put a message indicating an error --- ROX-Filer/Help/Changes | 5 +++++ ROX-Filer/src/infobox.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ROX-Filer/Help/Changes b/ROX-Filer/Help/Changes index 446e5ca9..5c311eaa 100644 --- a/ROX-Filer/Help/Changes +++ b/ROX-Filer/Help/Changes @@ -2,6 +2,11 @@ A RISC OS-like filer for X by Thomas Leonard +26-Jun-2004 +~~~~~~~~~~~ +Another Properties window fix: if there is no output from the du command +then put a message indicating an error (Stephen Watson). + 23-Jun-2004 ~~~~~~~~~~~ Let the panel autoscroll during a drag (Stephen Watson). diff --git a/ROX-Filer/src/infobox.c b/ROX-Filer/src/infobox.c index c97ed35a..ab418a8f 100644 --- a/ROX-Filer/src/infobox.c +++ b/ROX-Filer/src/infobox.c @@ -455,6 +455,8 @@ static gboolean read_du_output(GIOChannel *source, GIOCondition cond, DU *du) insert_size(du, line->str); break; case G_IO_STATUS_EOF: + set_cell(du->store, du->path, + _("Failed to read size")); break; case G_IO_STATUS_AGAIN: g_string_free(line, TRUE); @@ -589,7 +591,8 @@ static GtkWidget *make_details(const guchar *path, DirItem *item, NULL)) { du->chan = g_io_channel_unix_new(out); - du->watch = g_io_add_watch(du->chan, G_IO_IN, + du->watch = g_io_add_watch(du->chan, + G_IO_IN|G_IO_ERR|G_IO_HUP, (GIOFunc) read_du_output, du); g_object_ref(G_OBJECT(du->store)); g_signal_connect(G_OBJECT(view), "destroy", -- 2.11.4.GIT