#include <glib.h>
#include <stdlib.h>
#include <gio/gio.h>
-#include <storage.h>
#include "media-util-internal.h"
#include "media-util-dbg.h"
char repl_path[MAX_FILEPATH_LEN] = {0, };
#if !defined(_USE_SENIOR_MODE) && !defined(_USE_TV_PATH)
char *tmp_path = NULL;
+ const char *old_path = "/opt/usr/media";
#endif
bus = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
memset(repl_path, 0, sizeof(repl_path));
#if !defined(_USE_SENIOR_MODE) && !defined(_USE_TV_PATH)
/* Need uid to change path */
- if (strncmp(path, MEDIA_ROOT_PATH_EXTERNAL, strlen(MEDIA_ROOT_PATH_EXTERNAL)) == 0) {
- snprintf(repl_path, sizeof(repl_path), "%s", path);
+ if (strncmp(path, "/opt/usr/home", strlen("/opt/usr/home")) == 0) {
+ tmp_path = strstr(path, MEDIA_CONTENT_PATH);
+ snprintf(repl_path, sizeof(repl_path), "%s%s", old_path, tmp_path + strlen(MEDIA_CONTENT_PATH));
} else {
- if (storage_get_compat_internal_path(path, MAX_FILEPATH_LEN, repl_path) != STORAGE_ERROR_NONE) {
- MSAPI_DBG("Failed to change internal path..[%s] So, sending original path", path);
- memset(repl_path, 0, sizeof(repl_path));
- snprintf(repl_path, sizeof(repl_path), "%s", path);
- }
+ snprintf(repl_path, sizeof(repl_path), "%s", path);
}
MSAPI_DBG("New path: [%s]", repl_path);