popup for corrupted zip file 14/92314/1 submit/tizen_mobile/20161014.132229
authorshubham kumar <shubham.srib@samsung.com>
Fri, 14 Oct 2016 11:46:27 +0000 (17:16 +0530)
committershubham kumar <shubham.srib@samsung.com>
Fri, 14 Oct 2016 11:46:27 +0000 (17:16 +0530)
Change-Id: I61ead0145f739832f534b172e082a4feadea85b7
Signed-off-by: shubham kumar <shubham.srib@samsung.com>
src/widget/mf-context-popup.c
src/widget/mf-decompress-view.c

index 57c90e2..608269f 100755 (executable)
@@ -462,9 +462,14 @@ void mf_context_popup_create_more(void *data, Evas_Object *parent)
        struct appdata* ap = (struct appdata *)data;
        SAFE_FREE_OBJ(ap->mf_MainWindow.pContextPopup);
 
-       if (mf_fm_svc_wrapper_is_root_path(ap->mf_Status.path->str) == MYFILE_OTG) {
+       char *temp_path = g_strdup(ap->mf_Status.path->str);
+       mf_util_to_lower(temp_path);
+       if ((mf_fm_svc_wrapper_is_root_path(ap->mf_Status.path->str) == MYFILE_OTG) || (temp_path && strstr(temp_path, "usb"))) {
+               SAFE_FREE_G_CHAR(temp_path);
                return;
        }
+       SAFE_FREE_G_CHAR(temp_path);
+
        Evas_Object *ctxpopup = NULL;
        ctxpopup = elm_ctxpopup_add(ap->mf_MainWindow.pWindow);
        elm_object_style_set(ctxpopup, "more/default");
index 9707a95..1cba0b1 100644 (file)
@@ -30,6 +30,7 @@
 #include "mf-edit-view.h"
 #include "mf-object.h"
 #include "mf-search-view.h"
+#include "mf-popup.h"
 
 #include <unzip.h>
 #include <mime_type.h>
@@ -213,6 +214,9 @@ static Evas_Object * __mf_decompress_view_create_content(void *data)
 
        if(uf == NULL) {
                mf_debug("unable to extract files");
+               ap->mf_MainWindow.pNormalPopup = mf_popup_create_popup(data, POPMODE_TITLE_TEXT_BTN, MF_LABEL_UNABLE_TO_OPEN_FILE, MF_LABEL_NO_APP, MF_BUTTON_LABEL_OK, NULL, NULL, mf_callback_unsupported_app_cb, ap);
+               mf_callback_cancel_cb(ap,NULL,NULL);
+               return NULL;
        }
 
 
@@ -276,6 +280,9 @@ void mf_decompress_view_create(void *data)
 
        ap->mf_MainWindow.pNaviBox = mf_object_create_box(ap->mf_MainWindow.pNaviLayout);
        newContent = __mf_decompress_view_create_content(ap);
+       if (newContent == NULL) {
+               return;
+       }
        evas_object_show(newContent);
 
        int location = mf_fm_svc_wrapper_is_root_path(ap->mf_Status.path->str);