summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-04-12 00:15:02 +0200
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-04-12 01:22:40 +0200
commit1f7b899c2e74aaecbee8f36c0e87e2aaa29e757c (patch)
treef08936406503053ef19311e19a96deea3534d379
parent10430c175793f70dd195d684d1ac9bc3e3a21bfe (diff)
downloadweston-common-1f7b899c2e74aaecbee8f36c0e87e2aaa29e757c.tar.gz
weston-common-1f7b899c2e74aaecbee8f36c0e87e2aaa29e757c.tar.bz2
weston-common-1f7b899c2e74aaecbee8f36c0e87e2aaa29e757c.zip
tz-launcher: also enumerate symlinks .desktop items in dirs
Change-Id: If452501c18d5c6c8e1d9e53ee9811685ed6d7cdc Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
-rw-r--r--tz-launcher/tz-launcher.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tz-launcher/tz-launcher.c b/tz-launcher/tz-launcher.c
index 0d670eb..f57618b 100644
--- a/tz-launcher/tz-launcher.c
+++ b/tz-launcher/tz-launcher.c
@@ -72,7 +72,7 @@ file_is_desktop_file_for_application (GFile *file, gboolean store_values, gchar
if (store_values)
*table = values;
else
- g_strfreev(values);
+ g_strfreev(values);
}
g_key_file_free (keyfile);
@@ -143,6 +143,8 @@ tz_launcher_parse_directory (GFile *directory)
GFileType type = g_file_info_get_file_type (info);
switch (type) {
case G_FILE_TYPE_REGULAR:
+ case G_FILE_TYPE_SYMBOLIC_LINK:
+ case G_FILE_TYPE_UNKNOWN:
tz_launcher_parse_file (file);
break;
case G_FILE_TYPE_DIRECTORY:
@@ -179,6 +181,8 @@ tz_launcher_parse_config_file (GFile *file)
g_printerr ("File \"%s\" is special !\n", line);
break;
case G_FILE_TYPE_REGULAR:
+ case G_FILE_TYPE_SYMBOLIC_LINK:
+ case G_FILE_TYPE_UNKNOWN:
tz_launcher_parse_file (linefile);
break;
case G_FILE_TYPE_DIRECTORY:
@@ -239,6 +243,8 @@ main (int argc, char *argv[])
g_printerr ("File \"%s\" is special !\n", argv[i]);
break;
case G_FILE_TYPE_REGULAR:
+ case G_FILE_TYPE_SYMBOLIC_LINK:
+ case G_FILE_TYPE_UNKNOWN:
tz_launcher_parse_file (desktopfile);
break;
case G_FILE_TYPE_DIRECTORY: