summaryrefslogtreecommitdiff
path: root/plugins/housekeeping/msd-disk-space.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-04-06 02:51:59 -0700
committerStefano Karapetsas <[email protected]>2012-04-06 02:51:59 -0700
commitf2acd50eb2525f6970dc1cf0e05060d3d3cc135d (patch)
tree0a6d88c31e6bf3a2b103da9386590ee2d4a6d434 /plugins/housekeeping/msd-disk-space.c
parentab589772234b8c89260bf10503df64bb2396070a (diff)
parentc96bc4ead7779af1617f505e1590ab8652242ad0 (diff)
downloadmate-settings-daemon-f2acd50eb2525f6970dc1cf0e05060d3d3cc135d.tar.bz2
mate-settings-daemon-f2acd50eb2525f6970dc1cf0e05060d3d3cc135d.tar.xz
Merge pull request #4 from benpicco/master
sync with upstream
Diffstat (limited to 'plugins/housekeeping/msd-disk-space.c')
-rw-r--r--plugins/housekeeping/msd-disk-space.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/housekeeping/msd-disk-space.c b/plugins/housekeeping/msd-disk-space.c
index 6842ae5..e36be16 100644
--- a/plugins/housekeeping/msd-disk-space.c
+++ b/plugins/housekeeping/msd-disk-space.c
@@ -181,7 +181,7 @@ ldsm_notify_for_mount (LdsmMountInfo *mount,
gboolean has_trash;
gboolean has_disk_analyzer;
gboolean retval = TRUE;
- const gchar *path;
+ gchar *path;
/* Don't show a dialog if one is already displayed */
if (dialog)
@@ -190,7 +190,7 @@ ldsm_notify_for_mount (LdsmMountInfo *mount,
name = g_unix_mount_guess_name (mount->mount);
free_space = (gint64) mount->buf.f_frsize * (gint64) mount->buf.f_bavail;
has_trash = ldsm_mount_has_trash (mount);
- path = g_unix_mount_get_mount_path (mount->mount);
+ path = g_strdup (g_unix_mount_get_mount_path (mount->mount));
program = g_find_program_in_path (DISK_SPACE_ANALYZER);
has_disk_analyzer = (program != NULL);
@@ -218,7 +218,7 @@ ldsm_notify_for_mount (LdsmMountInfo *mount,
break;
case MSD_LDSM_DIALOG_RESPONSE_ANALYZE:
retval = FALSE;
- ldsm_analyze_path (g_unix_mount_get_mount_path (mount->mount));
+ ldsm_analyze_path (path);
break;
case MSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH:
retval = TRUE;
@@ -232,6 +232,8 @@ ldsm_notify_for_mount (LdsmMountInfo *mount,
g_assert_not_reached ();
}
+ g_free (path);
+
return retval;
}