int dp_interface_get_temp_path(const int id, char **temp_path)
{
+ char compat_filename[DOWNLOAD_FILENAME_MAX] = {0, };
int index = __get_my_slot_index(id);
+ int ret = DOWNLOAD_ADAPTOR_ERROR_NONE;
if (index < 0 || !temp_path)
return DOWNLOAD_ADAPTOR_ERROR_INVALID_PARAMETER;
if (!g_interface_slots[index].saved_temp_path) {
- *temp_path = NULL;
- return DOWNLOAD_ADAPTOR_ERROR_NO_DATA;
+ ret = __dp_ipc_get_string(id, DP_PROP_TEMP_SAVED_PATH, temp_path, __FUNCTION__);
+ if (storage_get_compat_internal_path(*temp_path, DOWNLOAD_FILENAME_MAX, compat_filename) == 0) {
+ /* Converted. Use converted path. */
+ TRACE_ERROR("Converted filename : %s -> %s", *temp_path, compat_filename);
+ *temp_path = strdup(compat_filename);
+ }
+ } else {
+ *temp_path = strdup(g_interface_slots[index].saved_temp_path);
}
-
- *temp_path = strdup(g_interface_slots[index].saved_temp_path);
- return DOWNLOAD_ADAPTOR_ERROR_NONE;
+ return ret;
}
int dp_interface_get_content_name(const int id, char **content_name)