rime / librime

Rime Input Method Engine, the core library
https://rime.im
BSD 3-Clause "New" or "Revised" License
3.41k stars 559 forks source link

user.yaml需要部署到build下面嗎? #237

Closed osfans closed 5 years ago

osfans commented 5 years ago

目前手動寫user.yaml會失敗,log如下:

12-24 18:00:07.970 30806 30806 W native  : W/config_data.cc:62 nonexistent config file '/sdcard/rime/build/user.yaml'.
12-24 18:00:07.970 30806 30806 I native  : I/config_data.cc:199 write: var/previously_selected_schema
12-24 18:00:07.970 30806 30806 I native  : I/config_data.cc:199 write: var/schema_access_time/cangjie5

代碼如下:


  RimeConfig config = {0};
  Bool b = RimeConfigOpen("user", &config);
  if (b) {
    b = RimeConfigSetString(&config, "var/previously_selected_schema", s);
    str = "var/schema_access_time/" + str;
    b = RimeConfigSetInt(&config, str.c_str(), time(NULL));
  }
  RimeConfigClose(&config);```
osfans commented 5 years ago

4e4a49182d488730c0467fca7a63f8e756c66804:果然換成RimeUserConfigOpen就好了。