22017988c6
GitOrigin-RevId: c777cdf5c564015d5f63b09cc93bef4178b19b01
18 lines
638 B
Diff
18 lines
638 B
Diff
:100644 100644 fac4f53 aed9617 M src/rimeengine.cpp
|
|
|
|
diff --git a/src/rimeengine.cpp b/src/rimeengine.cpp
|
|
index fac4f53..aed9617 100644
|
|
--- a/src/rimeengine.cpp
|
|
+++ b/src/rimeengine.cpp
|
|
@@ -164,7 +164,10 @@ void RimeEngine::rimeStart(bool fullcheck) {
|
|
RIME_ERROR() << "Failed to create user directory: " << userDir;
|
|
}
|
|
}
|
|
- const char *sharedDataDir = RIME_DATA_DIR;
|
|
+ const char *sharedDataDir = getenv("NIX_RIME_DATA_DIR");
|
|
+ if (!sharedDataDir) {
|
|
+ sharedDataDir = RIME_DATA_DIR;
|
|
+ }
|
|
|
|
RIME_STRUCT(RimeTraits, fcitx_rime_traits);
|
|
fcitx_rime_traits.shared_data_dir = sharedDataDir;
|