More work on dnd kitten

This commit is contained in:
Kovid Goyal
2026-05-03 06:54:43 +05:30
parent cd7d3026f6
commit 7d468cb000
2 changed files with 13 additions and 4 deletions

View File

@@ -351,11 +351,11 @@ func dnd_main(cmd *cli.Command, opts *Options, args []string) (rc int, err error
}
var uri_list []uri_list_item
for _, arg := range args {
st, err := os.Stat(arg)
st, err := os.Lstat(arg)
if err != nil {
return 1, err
}
if st.IsDir() || st.Mode().IsRegular() {
if st.IsDir() || st.Mode().IsRegular() || st.Mode().Type()&os.ModeSymlink != 0 {
path, err := filepath.Abs(arg)
if err != nil {
return 1, err