summaryrefslogtreecommitdiff
path: root/client/as-compose.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/as-compose.c')
-rw-r--r--client/as-compose.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/as-compose.c b/client/as-compose.c
index 4098ddd..d55ec76 100644
--- a/client/as-compose.c
+++ b/client/as-compose.c
@@ -478,6 +478,13 @@ main (int argc, char **argv)
g_string_append (desktop_basename, ".desktop");
}
+ if (!g_str_has_suffix (desktop_basename->str, ".desktop")) {
+ /* TRANSLATORS: not a valid desktop filename */
+ g_print ("%s: %s\n", _("Invalid desktop filename"),
+ desktop_basename->str);
+ return EXIT_FAILURE;
+ }
+
desktop_path = g_build_filename (prefix, "share", "applications",
desktop_basename->str, NULL);
g_debug ("looking for desktop path '%s'", desktop_path);