elm_photo: sanitise file path
authorkabeer khan <kabeer.khan@samsung.com>
Fri, 13 Feb 2015 07:26:04 +0000 (16:26 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Fri, 13 Feb 2015 07:26:05 +0000 (16:26 +0900)
Summary:
Resolved FIXME deal with relative path by sanitising file path

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewers: stephenmhouston, cedric, seoz, devilhorns

Reviewed By: cedric, seoz, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1874

src/lib/elm_photo.c

index d16a54c..a6a08c2 100644 (file)
@@ -162,7 +162,7 @@ _long_press_cb(void *obj)
      {
         char buf[4096 + 7];
 
-        /* FIXME: Deal with relative paths; use PATH_MAX */
+        file = eina_file_path_sanitize(file);
         snprintf(buf, sizeof(buf), "file://%s", file);
         if (elm_drag_start
               (obj, ELM_SEL_FORMAT_IMAGE, buf, ELM_XDND_ACTION_MOVE,