[TSAM-8338][TSAM-8296]Rename/Create folder/shortcut issue resolved 25/90625/2
authorshubham kumar <shubham.srib@samsung.com>
Mon, 3 Oct 2016 08:57:36 +0000 (14:27 +0530)
committershubham kumar <shubham.srib@samsung.com>
Mon, 3 Oct 2016 09:12:47 +0000 (14:42 +0530)
Change-Id: Ia4219c2f7b52bbf0cf50e9a4db8969c3a859fad6
Signed-off-by: shubham kumar <shubham.srib@samsung.com>
inc/mf-resource.h
src/common/mf-callback.c

index a338224..3279d45 100755 (executable)
 #define MF_LABEL_CONNECT_TO_WIFI_CONTENT               "IDS_MF_POP_YOU_NEED_TO_BE_CONNECTED_TO_A_WI_FI_NETWORK_TO_SCAN_FOR_NEARBY_DEVICES_CONNECT_VIA_WI_FI_AND_TRY_AGAIN"
 #define MF_LABEL_NO_RESULT_FOUND                       "IDS_ST_BODY_NO_RESULTS_FOUND"
 #define MF_LABEL_REMOVE_SHORTCUT                       "IDS_HS_HEADER_REMOVE_SHORTCUT_ABB"
-#define MF_LABEL_RENAME_SHORTCUT               "Rename shortcut"
+#define MF_LABEL_RENAME_SHORTCUT               "IDS_MF_OPT_RENAME_SHORTCUT_ABB"
 #define MF_LABEL_NONE                          "IDS_COM_BODY_NONE"
 #define MF_LABEL_MOVE_TO_PRIVATE                               "IDS_GALLERY_OPT_MOVE_TO_PRIVATE"
 #define MF_LABEL_REMOVE_FROM_PRIVATE                   "IDS_GALLERY_OPT_REMOVE_FROM_PRIVATE"
 #define MF_LABEL_ALL_FILES                     "IDS_MF_HEADER_ALL_FILES"
 #define MF_LABEL_DOWNLOADED_APP                        "Downloaded app"
 #define MF_LABEL_DOWNLOADED_APP_ENTER                  "IDS_MF_HEADER_DOWNLOAD_HISTORY_ABB"
-#define MF_LABEL_DELETE_SHORTCUT               "Delete shortcut"
+#define MF_LABEL_DELETE_SHORTCUT               "IDS_MF_OPT_DELETE_SHORTCUT_ABB"
 #define MF_LABEL_DELETE_THIS_SHORTCUT          "This shortcut will be deleted."
 #define MF_LABEL_DELETE_SHORTCUTS_Q            "%d shortcuts will be deleted."
 #define MF_LABEL_DELETE_THIS_RECENT            "IDS_DM_POP_THIS_ITEM_WILL_BE_DELETED_ABB"
index bd8d3f0..6cf59ea 100755 (executable)
@@ -1029,7 +1029,8 @@ void mf_callback_rename_save_cb(void *ad, Evas_Object *obj, void *event_info)
                }
 
                if (mf_is_dir(ap->mf_FileOperation.to_rename->str)) {
-                       if (strncmp(name, ".", strlen(".")) == 0 || strncmp(name, "..", strlen("..")) == 0) {
+                       if ((strncmp(name, ".", strlen(".")) == 0 && strlen(name) == strlen(".") )
+                                       || (strncmp(name, "..", strlen("..")) == 0 && strlen(name) == strlen(".."))) {
                                message = MF_MSG_SET_NAME_DOT;
                                SAFE_FREE_CHAR(strstrip_name);
                                SAFE_FREE_CHAR(pName);
@@ -1271,7 +1272,8 @@ void mf_callback_new_folder_save_cb(void *data, Evas_Object *obj, void *event_in
                                        mf_debug("Name contains illegal character!!!");
                                        goto ERROR_WARNING_EXIT;
                                }
-                               if (strncmp(test_space, ".", strlen(".")) == 0 || strncmp(test_space, "..", strlen("..")) == 0) {
+                               if ((strncmp(test_space, ".", strlen(".")) == 0 && strlen(test_space) == strlen(".") ) ||
+                                               (strncmp(test_space, "..", strlen("..")) == 0) && strlen(test_space) == strlen("..")) {
                                        message = MF_MSG_SET_NAME_DOT;
                                        SAFE_FREE_CHAR(name);
                                        SAFE_FREE_CHAR(fullpath);