diff options
| author | Andrea Azzarone <azzaronea@gmail.com> | 2016-06-02 01:01:41 +0000 |
|---|---|---|
| committer | Bileto Bot <ci-train-bot@canonical.com> | 2016-06-02 01:01:41 +0000 |
| commit | b79d32d6a581644cb9dd71b17cfb4aa32d7ccfe0 (patch) | |
| tree | 972660550848307176901eeee329c52d10e1c684 | |
| parent | 1731ef2e36b701e9e936fac7b7aebb39ebce93a5 (diff) | |
| parent | 15415818c926f2a5d01b4271700242367c98c852 (diff) | |
Fallback to volume name if no other identifier is available. (LP: #1103593)
(bzr r4125)
| -rw-r--r-- | launcher/VolumeImp.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/launcher/VolumeImp.cpp b/launcher/VolumeImp.cpp index f9696823a..7e9957eea 100644 --- a/launcher/VolumeImp.cpp +++ b/launcher/VolumeImp.cpp @@ -86,7 +86,10 @@ public: glib::String label(g_volume_get_identifier(volume_, G_VOLUME_IDENTIFIER_KIND_LABEL)); glib::String uuid(g_volume_get_identifier(volume_, G_VOLUME_IDENTIFIER_KIND_UUID)); - return uuid.Str() + "-" + label.Str(); + if (!label && !uuid) + return GetName(); + else + return uuid.Str() + "-" + label.Str(); } std::string GetUnixDevicePath() const |
