Evas image: Return proper path even with mmap
authorJean-Philippe Andre <jp.andre@samsung.com>
Fri, 10 Apr 2015 07:18:54 +0000 (16:18 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Fri, 10 Apr 2015 07:47:12 +0000 (16:47 +0900)
Since we're using a union (u.{f,file} we can't just
return u.file when the file was set as an mmap source.

@fix

src/lib/evas/canvas/evas_object_image.c

index ebd3292..36e0a80 100644 (file)
@@ -607,7 +607,13 @@ _evas_image_efl_file_file_set(Eo *eo_obj, Evas_Image_Data *o, const char *file,
 EOLIAN static void
 _evas_image_efl_file_file_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, const char **file, const char **key)
 {
-   if (file) *file = o->cur->u.file;
+   if (file)
+     {
+        if (o->cur->mmaped_source)
+          *file = eina_file_filename_get(o->cur->u.f);
+        else
+          *file = o->cur->u.file;
+     }
    if (key) *key = o->cur->key;
 }