From: Hyihong Chae Date: Tue, 12 Apr 2016 05:08:11 +0000 (+0900) Subject: fix directory path error X-Git-Tag: accepted/tizen/common/20160412.131004^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9caeb6109447c8eb959e845033c32b27ada7d865;p=platform%2Fcore%2Fconnectivity%2Fmtp-responder.git fix directory path error Change-Id: Ia15bdf906f9a2af2e2a1a6c447de27d47919f505 Signed-off-by: HyiHong Chae --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5154fb0..e3ce4d5 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/include/mtp_config.h b/include/mtp_config.h index 87bedac..9d166c3 100755 --- a/include/mtp_config.h +++ b/include/mtp_config.h @@ -18,6 +18,7 @@ #define _MTP_CONFIG_H_ #include +#include /* 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 */ diff --git a/packaging/mtp-responder.spec b/packaging/mtp-responder.spec index 7c79f6e..95b6ab6 100755 --- a/packaging/mtp-responder.spec +++ b/packaging/mtp-responder.spec @@ -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 diff --git a/src/entity/mtp_device.c b/src/entity/mtp_device.c index dad5fcb..5c4a870 100755 --- a/src/entity/mtp_device.c +++ b/src/entity/mtp_device.c @@ -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: diff --git a/src/mtp_inoti_handler.c b/src/mtp_inoti_handler.c index b4daf28..6c8f767 100755 --- a/src/mtp_inoti_handler.c +++ b/src/mtp_inoti_handler.c @@ -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);