summaryrefslogtreecommitdiff
path: root/legacy/efreet/src/lib/efreet_desktop_command.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2011-04-04 13:43:01 +0000
committerTom Hacohen <tom@stosb.com>2011-04-04 13:43:01 +0000
commitbabf703cb941cb0a508f4b738050c7da3e2eedf9 (patch)
tree41eec8ec21a0a2382e73d9ed10515f8dbd917ccb /legacy/efreet/src/lib/efreet_desktop_command.c
parent4eaf1b7ba03e8f14fd8014c25fffdc8b59ec40e9 (diff)
Efreet desktop: Fixed URI creation when opening files.
URI should be escaped before passed to the application being executed. This fixes runnig videos with vlc from paths with utf8 values in them. SVN revision: 58329
Diffstat (limited to 'legacy/efreet/src/lib/efreet_desktop_command.c')
-rw-r--r--legacy/efreet/src/lib/efreet_desktop_command.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/legacy/efreet/src/lib/efreet_desktop_command.c b/legacy/efreet/src/lib/efreet_desktop_command.c
index 8174c0a..658132c 100644
--- a/legacy/efreet/src/lib/efreet_desktop_command.c
+++ b/legacy/efreet/src/lib/efreet_desktop_command.c
@@ -716,9 +716,16 @@ efreet_desktop_command_file_process(Efreet_Desktop_Command *command, const char
716 716
717 if (command->flags & EFREET_DESKTOP_EXEC_FLAG_URI) 717 if (command->flags & EFREET_DESKTOP_EXEC_FLAG_URI)
718 { 718 {
719 char buf[PATH_MAX]; 719 const char *buf;
720 snprintf(buf, sizeof(buf), "file://%s", absol); 720 Efreet_Uri ef_uri;
721 ef_uri.protocol = "file";
722 ef_uri.hostname = "";
723 ef_uri.path = absol;
724 buf = efreet_uri_encode(&ef_uri);
725
721 f->uri = strdup(buf); 726 f->uri = strdup(buf);
727
728 eina_stringshare_del(buf);
722 } 729 }
723 730
724 free(absol); 731 free(absol);