[baobab] Fix showing (null) for main volume if hostname is NULL
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab] Fix showing (null) for main volume if hostname is NULL
- Date: Mon, 22 Oct 2012 21:50:08 +0000 (UTC)
commit ccb171018ca37f7ad355eb572f934cdb3e506641
Author: Garrett Regier <garrettregier gmail com>
Date: Mon Oct 22 14:40:57 2012 -0700
Fix showing (null) for main volume if hostname is NULL
src/baobab-location.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/baobab-location.vala b/src/baobab-location.vala
index dac2bbe..667641f 100644
--- a/src/baobab-location.vala
+++ b/src/baobab-location.vala
@@ -116,6 +116,10 @@ namespace Baobab {
try {
name = get_hostname ();
} catch (Error e) {
+ name = null;
+ }
+
+ if (name == null) {
name = _("Main volume");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]