Sync to the latest code 06/10406/2 accepted/tizen/ivi/stable accepted/tizen_generic accepted/tizen/20131014.080202 accepted/tizen/20131014.165321 accepted/tizen/20131014.172032 accepted/tizen_ivi_stable/20131116.100759 submit/tizen/20131014.075743 submit/tizen_ivi_stable/20131116.100239
authorjunsuk77.oh <junsuk77.oh@samsung.com>
Tue, 1 Oct 2013 12:30:49 +0000 (21:30 +0900)
committerjunsuk77.oh <junsuk77.oh@samsung.com>
Wed, 2 Oct 2013 08:54:31 +0000 (17:54 +0900)
1. remove entry of mmc path during pkg is moving
2. add dirname for debugging in print message

Change-Id: I1050bdc31b25d1b653eeecc68b5b426d67d0c721
Signed-off-by: junsuk77.oh <junsuk77.oh@samsung.com>
plugin/app2sd/src/app2sd_internals.c
plugin/app2sd/src/app2sd_internals_utils.c

index 8ba3f46..d9edb4d 100755 (executable)
@@ -705,11 +705,18 @@ int _app2sd_move_app_to_external(const char *pkgid, GList* dir_list)
        /*check whether application is in external memory or not */
        fp = fopen(mmc_path, "r+");
        if (fp != NULL) {
+               const char *argv[] = { "/bin/rm", "-rf", mmc_path, NULL };
                app2ext_print
-                   ("Already %s entry is present in the SD Card\n",
+                   ("Already %s entry is present in the SD Card, delete entry and go on without return\n",
                     pkgid);
                fclose(fp);
-               return APP2EXT_ERROR_ALREADY_FILE_PRESENT;
+//             return APP2EXT_ERROR_ALREADY_FILE_PRESENT;
+               ret = _xsystem(argv);
+               if (ret) {
+                       app2ext_print
+                               ("delete fail[%s]\n",
+                               mmc_path);
+               }
        }
 
        snprintf(app_mmc_path, FILENAME_MAX,
index 38562ed..e49bd11 100755 (executable)
@@ -170,7 +170,7 @@ int _app2sd_delete_directory(char *dirname)
                if (ret <0)
                        return -1;
        } else {
-               app2ext_print("Couldn't open the directory\n");
+               app2ext_print("Couldn't open the directory[%s]\n", dirname);
        }
        return 0;
 }