32d84ada85
- Backport FTP and Computer backend patches from master
37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
From 5d3ab40b5b0a574f207e7177d2f4c3bd329458a4 Mon Sep 17 00:00:00 2001
|
|
From: David Zeuthen <davidz@redhat.com>
|
|
Date: Tue, 16 Jun 2009 17:41:45 -0400
|
|
Subject: [PATCH 06/13] =?utf-8?q?Bug=20582772=20=E2=80=93=20gvfsd-computer=20crashes=20with=20SEGSEV=20in=20recompute=5Ffiles?=
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=utf-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Never use blank/empty drive names.
|
|
---
|
|
monitor/gdu/ggdudrive.c | 9 +++++++++
|
|
1 files changed, 9 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/monitor/gdu/ggdudrive.c b/monitor/gdu/ggdudrive.c
|
|
index 8e04104..6195f97 100644
|
|
--- a/monitor/gdu/ggdudrive.c
|
|
+++ b/monitor/gdu/ggdudrive.c
|
|
@@ -177,6 +177,15 @@ update_drive (GGduDrive *drive)
|
|
if (device != NULL)
|
|
g_object_unref (device);
|
|
|
|
+ /* Never use empty/blank names (#582772) */
|
|
+ if (drive->name == NULL || strlen (drive->name) == 0)
|
|
+ {
|
|
+ if (drive->device_file != NULL)
|
|
+ drive->name = g_strdup_printf (_("Unnamed Drive (%s)"), drive->device_file);
|
|
+ else
|
|
+ drive->name = g_strdup (_("Unnamed Drive"));
|
|
+ }
|
|
+
|
|
/* compute whether something changed */
|
|
changed = !((old_is_media_removable == drive->is_media_removable) &&
|
|
(old_has_media == drive->has_media) &&
|
|
--
|
|
1.6.3.2
|
|
|