fix: always enter directory entries as a directory
This commit is contained in:
parent
9814c8b3f1
commit
0d5db08015
1 changed files with 3 additions and 3 deletions
|
|
@ -394,15 +394,15 @@ M.select = function(opts)
|
|||
local scheme, dir = util.parse_url(bufname)
|
||||
local child = dir .. entry.name
|
||||
local url = scheme .. child
|
||||
if
|
||||
entry.type == "directory"
|
||||
local is_directory = entry.type == "directory"
|
||||
or (
|
||||
entry.type == "link"
|
||||
and entry.meta
|
||||
and entry.meta.link_stat
|
||||
and entry.meta.link_stat.type == "directory"
|
||||
)
|
||||
then
|
||||
if is_directory then
|
||||
url = url .. "/"
|
||||
-- If this is a new directory BUT we think we already have an entry with this name, disallow
|
||||
-- entry. This prevents the case of MOVE /foo -> /bar + CREATE /foo.
|
||||
-- If you enter the new /foo, it will show the contents of the old /foo.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue