mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
114f263aa8
commit
44403cbdfc
1 changed files with 1 additions and 1 deletions
|
|
@ -118,7 +118,7 @@ impl Require {
|
||||||
fn absolute_id<'a>(lua: &Lua, id: &'a str) -> mlua::Result<Cow<'a, str>> {
|
fn absolute_id<'a>(lua: &Lua, id: &'a str) -> mlua::Result<Cow<'a, str>> {
|
||||||
let Some(stripped) = id.strip_prefix('.') else { return Ok(id.into()) };
|
let Some(stripped) = id.strip_prefix('.') else { return Ok(id.into()) };
|
||||||
Ok(if let Some(cur) = runtime!(lua)?.current() {
|
Ok(if let Some(cur) = runtime!(lua)?.current() {
|
||||||
format!("{cur}.{stripped}").into()
|
format!("{}.{stripped}", cur.split('.').next().unwrap_or(cur)).into()
|
||||||
} else {
|
} else {
|
||||||
stripped.into()
|
stripped.into()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue