summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmain/src/control/ivug-parameter.c15
1 files 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);
}