mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
made mlua::Value::Nil only import on windows
This commit is contained in:
parent
5501436953
commit
5e64f15f59
2 changed files with 4 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ function Folder:linemode(area, files)
|
||||||
elseif mode == "owner" then
|
elseif mode == "owner" then
|
||||||
if f.cha.uid and f.cha.gid then
|
if f.cha.uid and f.cha.gid then
|
||||||
local user = ya.user_name(f.cha.uid)
|
local user = ya.user_name(f.cha.uid)
|
||||||
local group = ya.user_name(f.cha.uid)
|
local group = ya.group_name(f.cha.gid)
|
||||||
if user and group then
|
if user and group then
|
||||||
spans[#spans + 1] = ui.Span(user .. ":" .. group)
|
spans[#spans + 1] = ui.Span(user .. ":" .. group)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||||
|
|
||||||
use mlua::{AnyUserData, ExternalError, Lua, Table, UserDataFields, UserDataMethods, UserDataRef, Value::Nil};
|
use mlua::{AnyUserData, ExternalError, Lua, Table, UserDataFields, UserDataMethods, UserDataRef};
|
||||||
|
#[cfg(windows)]
|
||||||
|
use mlua::Value::Nil;
|
||||||
use yazi_shared::fs::ChaKind;
|
use yazi_shared::fs::ChaKind;
|
||||||
|
|
||||||
use crate::bindings::Cast;
|
use crate::bindings::Cast;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue