diff --git a/gio/tests/trash.c b/gio/tests/trash.c index 1055585e5..b7df9363a 100644 --- a/gio/tests/trash.c +++ b/gio/tests/trash.c @@ -107,8 +107,19 @@ test_trash_symlinks (void) g_test_bug ("1522"); - /* The test assumes that ~/.local always exists. */ target = g_build_filename (g_get_home_dir (), ".local", NULL); + + if (!g_file_test (target, G_FILE_TEST_IS_DIR)) + { + gchar *message; + + message = g_strdup_printf ("Directory '%s' does not exist", target); + g_test_skip (message); + g_free (message); + g_free (target); + return; + } + target_mount = g_unix_mount_for (target, NULL); g_assert_nonnull (target_mount); g_test_message ("Target: %s (mount: %s)", target, g_unix_mount_get_mount_path (target_mount));