Revert "elm_config: remove profile name reading logic from data dir"
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Tue, 15 Jan 2019 20:42:18 +0000 (20:42 +0000)
committerJiyoun Park <jy0703.park@samsung.com>
Wed, 16 Jan 2019 04:10:41 +0000 (13:10 +0900)
This reverts commit 6c4e49d970ca6046780ba1b9fb226f465d14a497.

Hell no - this removes loading of system config profile. the entire
premise of the patch is wrong. it isn't reading the code at all... how
this got through review is rather amazing...

src/lib/elementary/elm_config.c

index 6bf176f..f3e8b4e 100644 (file)
@@ -1561,9 +1561,14 @@ _profile_fetch_from_conf(void)
           }
      }
 
-   if(!_use_build_config)
+   for (i = 0; i < 2 && !_use_build_config; i++)
      {
-        _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
+        // user profile
+        if (i == 0)
+          _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
+        // system profile
+        else if (i == 1)
+          _elm_data_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
         ef = eet_open(buf, EET_FILE_MODE_READ);
         if (ef)
           {