skins/AknSkins/sdcsrc/SDCReader.cpp
branchGCC_SURGE
changeset 92 8dd1c4fde3d7
parent 64 ecb300a325e8
child 107 9f95a5546443
--- a/skins/AknSkins/sdcsrc/SDCReader.cpp	Wed Jun 16 14:20:09 2010 +0100
+++ b/skins/AknSkins/sdcsrc/SDCReader.cpp	Thu Jul 22 16:43:58 2010 +0100
@@ -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 );
         }