Skip to content

Commit

Permalink
fixup! Use cache_directory for plugin hashes
Browse files Browse the repository at this point in the history
Use `cache_directory` rather than the `plugin_directory`
for plugin hashes.
  • Loading branch information
a-kenji committed Mar 17, 2022
1 parent 3506ca5 commit 1d46a86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions zellij-server/src/wasm_vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::{
};

use zellij_utils::{
consts::{VERSION, ZELLIJ_PROJ_DIR, ZELLIJ_TMP_DIR},
consts::{VERSION, ZELLIJ_CACHE_DIR, ZELLIJ_PROJ_DIR, ZELLIJ_TMP_DIR},
errors::{ContextType, PluginContext},
};
use zellij_utils::{
Expand Down Expand Up @@ -271,8 +271,7 @@ fn start_plugin(
let output = Pipe::new();
let input = Pipe::new();
let stderr = LoggingPipe::new(&plugin.location.to_string(), plugin_id);
let plugin_own_data_dir = plugin_global_data_dir.join(Url::from(&plugin.location).to_string());
#[cfg(not(feature = "disable_automatic_asset_installation"))]
let plugin_own_data_dir = ZELLIJ_CACHE_DIR.join(Url::from(&plugin.location).to_string());
fs::create_dir_all(&plugin_own_data_dir).unwrap_or_else(|e| {
log::error!(
"Could not create plugin_own_data_dir in {:?} \n Error: {:?}",
Expand Down
1 change: 1 addition & 0 deletions zellij-utils/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ lazy_static! {
pub static ref ZELLIJ_TMP_DIR: PathBuf = PathBuf::from(format!("/tmp/zellij-{}", *UID));
pub static ref ZELLIJ_TMP_LOG_DIR: PathBuf = ZELLIJ_TMP_DIR.join("zellij-log");
pub static ref ZELLIJ_TMP_LOG_FILE: PathBuf = ZELLIJ_TMP_LOG_DIR.join("zellij.log");
pub static ref ZELLIJ_CACHE_DIR: PathBuf = ZELLIJ_PROJ_DIR.cache_dir().to_path_buf();
}

pub const FEATURES: &[&str] = &[
Expand Down

0 comments on commit 1d46a86

Please sign in to comment.