fix: adapt for https://github.com/sxyazi/yazi/pull/3340
This commit is contained in:
@@ -190,7 +190,7 @@ local function setup(st, opts)
|
|||||||
|
|
||||||
Linemode:children_add(function(self)
|
Linemode:children_add(function(self)
|
||||||
local url = self._file.url
|
local url = self._file.url
|
||||||
local repo = st.dirs[tostring(url.base)]
|
local repo = st.dirs[tostring(url.base or url.parent)]
|
||||||
local code
|
local code
|
||||||
if repo then
|
if repo then
|
||||||
code = repo == CODES.excluded and CODES.ignored or st.repos[repo][tostring(url):sub(#repo + 2)]
|
code = repo == CODES.excluded and CODES.ignored or st.repos[repo][tostring(url):sub(#repo + 2)]
|
||||||
@@ -208,7 +208,7 @@ end
|
|||||||
|
|
||||||
---@type UnstableFetcher
|
---@type UnstableFetcher
|
||||||
local function fetch(_, job)
|
local function fetch(_, job)
|
||||||
local cwd = job.files[1].url.base
|
local cwd = job.files[1].url.base or job.files[1].url.parent
|
||||||
local repo = root(cwd)
|
local repo = root(cwd)
|
||||||
if not repo then
|
if not repo then
|
||||||
remove(tostring(cwd))
|
remove(tostring(cwd))
|
||||||
|
|||||||
Reference in New Issue
Block a user