Remove function for default mmc directory 22/172222/1 accepted/tizen/unified/20180314.062126 submit/tizen/20180313.034553
authorMinje Ahn <minje.ahn@samsung.com>
Tue, 13 Mar 2018 02:00:26 +0000 (11:00 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Tue, 13 Mar 2018 02:00:26 +0000 (11:00 +0900)
Change-Id: I163beb3f133e3f6af72881f5891390372c30dee9
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/common/include/media-common-external-storage.h
src/common/media-common-external-storage.c
src/server/media-server-device-block.c

index 65297cc..e5e226a 100755 (executable)
@@ -27,7 +27,6 @@
 int ms_present_mmc_status(ms_sdcard_status_type_t status);
 #endif
 
-void ms_make_default_path_mmc(const char *mount_path);
 int ms_get_mmc_id(char **cid);
 int ms_get_stg_changed_event(void);
 
index 5ed5c1a..1755354 100755 (executable)
@@ -22,7 +22,6 @@
 #include <stdio.h>
 #include <locale.h>
 #include <libintl.h>
-#include <sys/stat.h>
 #include <vconf.h>
 #include <glib.h>
 #include <notification.h>
 
 #define MMC_INFO_SIZE 256
 
-char default_path[][MS_FILE_NAME_LEN_MAX+1] = {
-               {"Images"},
-               {"Videos"},
-               {"Sounds"},
-               {"Downloads"},
-};
-
-#define DIR_NUM        ((int)(sizeof(default_path)/sizeof(default_path[0])))
-
-void ms_make_default_path_mmc(const char *mount_path)
-{
-       int i = 0;
-       int ret = 0;
-       char mmc_path[MS_FILE_NAME_LEN_MAX+1] = {0, };
-
-       for (i = 0; i < DIR_NUM; ++i) {
-               memset(mmc_path, 0, sizeof(mmc_path));
-               snprintf(mmc_path, sizeof(mmc_path), "%s/%s", mount_path, default_path[i]);
-               if (!g_file_test(mmc_path, G_FILE_TEST_IS_DIR)) {
-                       MS_DBG("%s path did not exist", mmc_path);
-                       ret = mkdir(mmc_path, 0770);
-                       if (ret < 0)
-                               MS_DBG_ERR("mkdir failed");
-
-                       /*this fuction for emulator*/
-                       /*at the first time, the directroies are made permission 755*/
-                       ret = chmod(mmc_path, 0770);
-                       if (ret != 0)
-                               MS_DBG_STRERROR("chmod failed");
-               }
-       }
-}
-
 static int __get_contents(const char *filename, char *buf)
 {
        FILE *fp;
index ccccdb2..ca929fa 100755 (executable)
@@ -272,7 +272,6 @@ int ms_mmc_insert_handler(const char *mount_path)
        }
 
        ms_present_mmc_status(MS_SDCARD_INSERTED);
-       ms_make_default_path_mmc(mount_path);
 
        ms_get_mmc_id(&cid);
        /* CHECK DB HERE!! */