aboutsummaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2021-05-06 21:38:10 +0200
committera-kenji <aks.kenji@protonmail.com>2021-05-12 19:51:29 +0200
commitffd8f17a94e60dc7fffea0a1ef5efccc693c5cd9 (patch)
tree62da299a597d95b7ba12272c3df4bc3ec7fc7ecd /src/server
parentMerge pull request #223 from zellij-org/isolate-pty (diff)
downloadsl0ppij-ffd8f17a94e60dc7fffea0a1ef5efccc693c5cd9.tar.gz
sl0ppij-ffd8f17a94e60dc7fffea0a1ef5efccc693c5cd9.tar.xz
sl0ppij-ffd8f17a94e60dc7fffea0a1ef5efccc693c5cd9.zip
Add Complile Time System Directories
closes #380 * --features disable_automatic_asset_installation disables automatic installation of the `data_dir` * a set PREFIX env will use `$PREFIX/zellij` as its `data_dir`
Diffstat (limited to 'src/server')
-rw-r--r--src/server/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/mod.rs b/src/server/mod.rs
index 6eb2455b..1f991c29 100644
--- a/src/server/mod.rs
+++ b/src/server/mod.rs
@@ -22,8 +22,8 @@ use crate::common::{
os_input_output::{set_permissions, ServerOsApi},
pty_bus::{PtyBus, PtyInstruction},
screen::{Screen, ScreenInstruction},
- setup::install::populate_data_dir,
- utils::consts::{ZELLIJ_IPC_PIPE, ZELLIJ_PROJ_DIR},
+ setup::{get_default_data_dir, install::populate_data_dir},
+ utils::consts::ZELLIJ_IPC_PIPE,
wasm_vm::{wasi_read_string, wasi_write_object, zellij_exports, PluginEnv, PluginInstruction},
ChannelWithContext, SenderType, SenderWithContext,
};
@@ -209,9 +209,9 @@ fn init_session(
let send_pty_instructions = SenderWithContext::new(SenderType::Sender(send_pty_instructions));
// Determine and initialize the data directory
- let data_dir = opts
- .data_dir
- .unwrap_or_else(|| ZELLIJ_PROJ_DIR.data_dir().to_path_buf());
+ let data_dir = opts.data_dir.unwrap_or_else(get_default_data_dir);
+
+ #[cfg(enable_automatic_assets_installation)]
populate_data_dir(&data_dir);
// Don't use default layouts in tests, but do everywhere else