summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nautilus-file.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index b48bf28e4..50bbe9e3b 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -7853,20 +7853,13 @@ nautilus_file_get_volume_free_space (NautilusFile *file)
char *
nautilus_file_get_volume_name (NautilusFile *file)
{
- GFile *location;
char *res;
- GMount *mount;
res = NULL;
-
- location = nautilus_file_get_location (file);
- mount = g_file_find_enclosing_mount (location, NULL, NULL);
- if (mount)
+ if (file->details->enclosing_mount)
{
- res = g_strdup (g_mount_get_name (mount));
- g_object_unref (mount);
+ res = g_strdup (g_mount_get_name (file->details->enclosing_mount));
}
- g_object_unref (location);
return res;
}