From: chengyj1985 Date: Tue, 12 Nov 2019 13:44:46 +0000 (+0800) Subject: fix path issue when get folder id X-Git-Tag: accepted/tizen/unified/20191114.042552~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5623cd03df8df0be8d574dedcd4d19b667b76d77;p=platform%2Fcore%2Fmultimedia%2Fmedia-server.git fix path issue when get folder id Change-Id: Icf52db1d8dfaab168ca33e3bbc2b79730ca0e10b --- diff --git a/src/common/media-common-db-svc.c b/src/common/media-common-db-svc.c index ae93649..1bd55bd 100644 --- a/src/common/media-common-db-svc.c +++ b/src/common/media-common-db-svc.c @@ -236,7 +236,10 @@ int __ms_check_item_exist(sqlite3 *handle, const char *storage_id, const char *p char* folder_id_folder = NULL; folder_id_media = (char *)sqlite3_column_text(sql_stmt, 4); - ret = ms_get_folder_id(handle, storage_id, path, &folder_id_folder); + char* folder_path = NULL; + folder_path = g_path_get_dirname(path); + ret = ms_get_folder_id(handle, storage_id, folder_path, &folder_id_folder); + MS_SAFE_FREE(folder_path); if(ret == MS_MEDIA_ERR_NONE) { if (g_strcmp0(folder_id_media, folder_id_folder) == 0) *modified = false;