diff options
author | deepsghimire <70006817+deepsghimire@users.noreply.github.com> | 2023-09-16 12:00:35 +0545 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-16 15:15:35 +0900 |
commit | f1bef8f0d150df38352379a2bce5666838cb0438 (patch) | |
tree | db01b52bfb7f6061b85056ae29b9455faa5fe3a6 /zellij-utils/src/consts.rs | |
parent | e70743e3f1911be1ee7961058e350e6416885c3e (diff) |
fix(utils): validate session name (#2607)
* fix(utils): validate session name
* cargo fmt
* refactor: assign constant values to variables
* refactor: move operations unrealted to the condition
---------
Co-authored-by: Jae-Heon Ji <atx6419@gmail.com>
Diffstat (limited to 'zellij-utils/src/consts.rs')
-rw-r--r-- | zellij-utils/src/consts.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/zellij-utils/src/consts.rs b/zellij-utils/src/consts.rs index 43990b4ba..9091052bb 100644 --- a/zellij-utils/src/consts.rs +++ b/zellij-utils/src/consts.rs @@ -112,6 +112,8 @@ mod unix_only { use nix::unistd::Uid; use std::env::temp_dir; + pub const ZELLIJ_SOCK_MAX_LENGTH: usize = 108; + lazy_static! { static ref UID: Uid = Uid::current(); pub static ref ZELLIJ_TMP_DIR: PathBuf = temp_dir().join(format!("zellij-{}", *UID)); |