From 67fe0ebbcd88616e6f7f673861c3ba82ff3e81d5 Mon Sep 17 00:00:00 2001 From: Jisung Ahn Date: Fri, 24 Aug 2012 15:48:53 +0900 Subject: support "file://" prefix Change-Id: Iffdef64bd50c4c0f42a96e7b1466189f3f6545f9 --- main/src/control/ivug-parameter.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/main/src/control/ivug-parameter.c b/main/src/control/ivug-parameter.c index 5bc94c7..ae5232e 100755 --- a/main/src/control/ivug-parameter.c +++ b/main/src/control/ivug-parameter.c @@ -54,7 +54,9 @@ //default values #define IVUG_DEFAULT_MODE IVUG_MODE_SINGLE -#define IVUG_DEFAULT_INDEX (1) // First item +#define IVUG_DEFAULT_INDEX (1) // First item + +#define IVUG_FILE_PREFIX "file://" static inline void _ivug_free(char **val) @@ -355,8 +357,15 @@ ivug_param_create_from_bundle(service_h service) service_get_extra_data (service, IVUG_BUNDLE_KEY_PATH, &szFilePath); if ( szFilePath != NULL ) - { - data->filepath = strdup(szFilePath); + { + if(strncmp(IVUG_FILE_PREFIX, szFilePath, strlen(IVUG_FILE_PREFIX)) == 0) + { + data->filepath = strdup(szFilePath + strlen(IVUG_FILE_PREFIX)); + } + else + { + data->filepath = strdup(szFilePath); + } MSG_IVUG_HIGH("Current File = %s", data->filepath); _ivug_free(&szFilePath); } -- cgit v1.2.3