bugfix filename check at screen capture
authorHyoyoung Chang <hyoyoung.chang@samsung.com>
Mon, 8 Nov 2010 12:01:48 +0000 (12:01 +0000)
committerHyoyoung Chang <hyoyoung.chang@samsung.com>
Mon, 8 Nov 2010 12:01:48 +0000 (12:01 +0000)
src/scrcapture.c
src/xcnphandler.c

index 59eb2b9..4dbeda3 100644 (file)
@@ -17,7 +17,7 @@
 
 typedef struct tag_captureimginfo
 {
-       char filename[64];
+       char filename[128];
        Evas_Object *eo;
        char *imgdata;
 } captureimginfo_t;
@@ -55,8 +55,8 @@ static Eina_Bool _scrcapture_capture_postprocess(void* data)
        imgpath = malloc(strlen(capimginfo->filename)+strlen("file://")+2);
        snprintf(imgpath, strlen(capimginfo->filename)+strlen("file://")+1,
                         "%s%s", "file://", capimginfo->filename);
-       DTRACE("add to image history = %s\n", imgpath);
-       clipdrawer_add_image_item(imgpath);
+       DTRACE("add to image history = %s\n", imgpath+strlen("file://"));
+       clipdrawer_add_image_item(imgpath+strlen("file://"));
        free(imgpath);
         
        evas_object_del(capimginfo->eo);
index b12ef6e..7ab5a82 100755 (executable)
@@ -240,7 +240,7 @@ int get_selection_content(void *data)
                1. does the file exist?
                2. dose the file wanted type? */
        if (!strncmp(unesc, "file://", 7) && 
-               (strstr(unesc,".png") || strstr(unesc,".jpg")) &&
+               (strcasestr(unesc,".png") || strcasestr(unesc,".jpg") || strcasestr(unesc,".bmp")) &&
                check_regular_file(unesc+7))
        {
                DTRACE("clipdrawer add path = %s\n", unesc+7);