skins/AknSkins/sdcsrc/SDCReader.cpp
branchRCL_3
changeset 111 2fab78db5d89
parent 107 9f95a5546443
child 125 c87e8f932595
--- a/skins/AknSkins/sdcsrc/SDCReader.cpp	Wed Sep 01 12:19:53 2010 +0100
+++ b/skins/AknSkins/sdcsrc/SDCReader.cpp	Tue Sep 14 23:14:23 2010 +0300
@@ -988,9 +988,30 @@
         {
         bool changed( true );
         if( sd_wcscasecmp( gInput.iToken, iData->iBmpPath ) == 0 ) changed = false;
-        iData->SetBmpPath( gInput.iToken );
         char buf[512];
         CSDCInput::ConvertToAscii( buf, gInput.iToken );
+
+        /* prepend EPOCROOT on linux */
+        if(buf[0] == '/')
+            {
+#if (defined(__MSVCRT__) || defined(_MSC_VER))
+            /* FIXME: We have to use \\ for referencing root path on Windows? */
+            buf[0] = '\\';
+            
+            CSDCInput::ConvertToWchar(gInput.iToken, buf);
+#else
+            char b[512];
+
+            sprintf(b, "%s%s", getenv("EPOCROOT"), buf);
+
+            strcpy(buf, b);
+
+            CSDCInput::ConvertToWchar(gInput.iToken, b);
+#endif
+            }
+
+        iData->SetBmpPath( gInput.iToken );
+        
         if( changed )
             printf("NOTE: Bitmap source path set to %s\n", buf );
         }