fix directory path error 60/65660/1 accepted/tizen/common/20160412.131004 accepted/tizen/ivi/20160412.063954 accepted/tizen/mobile/20160412.064014 accepted/tizen/tv/20160412.063945 accepted/tizen/wearable/20160412.063956 submit/tizen/20160412.051228
authorHyihong Chae <hh.chae@samsung.com>
Tue, 12 Apr 2016 05:08:11 +0000 (14:08 +0900)
committerHyihong Chae <hh.chae@samsung.com>
Tue, 12 Apr 2016 05:08:11 +0000 (14:08 +0900)
Change-Id: Ia15bdf906f9a2af2e2a1a6c447de27d47919f505
Signed-off-by: HyiHong Chae <hh.chae@samsung.com>
CMakeLists.txt
include/mtp_config.h
packaging/mtp-responder.spec
src/entity/mtp_device.c
src/mtp_inoti_handler.c

index 5154fb0..e3ce4d5 100755 (executable)
@@ -13,7 +13,7 @@ AUX_SOURCE_DIRECTORY(${CMAKE_SOURCE_DIR}/src/util SRCS)
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED glib-2.0 capi-content-media-content
-       capi-media-metadata-extractor vconf dlog tapi capi-system-info)
+       capi-media-metadata-extractor vconf dlog tapi capi-system-info libtzplatform-config)
 
 FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 87bedac..9d166c3 100755 (executable)
@@ -18,6 +18,7 @@
 #define _MTP_CONFIG_H_
 
 #include <stdbool.h>
+#include <tzplatform_config.h>
 
 /* Function Features */
 #define MTP_USE_INFORMATION_REGISTRY           /* for get and set some information value */
@@ -80,7 +81,7 @@
 #define MTP_STORE_PATH_CHAR            "/home/owner/content"
 
 /* External Storage */
-#define MTP_EXTERNAL_PATH_CHAR         "/usr/storage/sdcard"
+#define MTP_EXTERNAL_PATH_CHAR tzplatform_mkpath(TZ_SYS_MEDIA, "/sdcard")
 #define MTP_DEVICE_ICON                        "/usr/share/mtp/device_icon.ico"
 
 /* File For WMP extesions */
index 7c79f6e..95b6ab6 100755 (executable)
@@ -5,7 +5,7 @@ ExcludeArch: %arm aarch64
 
 Name:       mtp-responder
 Summary:    Media Transfer Protocol daemon (responder)
-Version:    0.0.5
+Version:    0.0.6
 Release:    1
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
@@ -20,6 +20,7 @@ BuildRequires: pkgconfig(tapi)
 BuildRequires: pkgconfig(capi-content-media-content)
 BuildRequires: pkgconfig(capi-media-metadata-extractor)
 BuildRequires: pkgconfig(capi-system-info)
+Buildrequires: pkgconfig(libtzplatform-config)
 Requires(post): /usr/bin/vconftool
 
 
index dad5fcb..5c4a870 100755 (executable)
@@ -610,7 +610,7 @@ static mtp_bool __add_store_to_device(store_type_t store_type)
                store_id = MTP_INTERNAL_STORE_ID;
                break;
        case MTP_STORAGE_EXTERNAL:
-               storage_path = MTP_EXTERNAL_PATH_CHAR;
+               storage_path = (mtp_char *)MTP_EXTERNAL_PATH_CHAR;
                store_id = MTP_EXTERNAL_STORE_ID;
                break;
        default:
index b4daf28..6c8f767 100755 (executable)
@@ -486,7 +486,7 @@ static void __remove_recursive_inoti_watch(mtp_char *path)
 static void __clean_up_inoti(void *data)
 {
        __remove_recursive_inoti_watch(MTP_STORE_PATH_CHAR);
-       __remove_recursive_inoti_watch(MTP_EXTERNAL_PATH_CHAR);
+       __remove_recursive_inoti_watch((mtp_char *)MTP_EXTERNAL_PATH_CHAR);
        __destroy_inoti_open_files_list();
 
        close(g_inoti_fd);