Add flag to specify drop directory for dnd kitten

This commit is contained in:
Kovid Goyal
2026-05-05 09:47:12 +05:30
parent fd7e43ab0c
commit fd451f5974
2 changed files with 10 additions and 1 deletions

View File

@@ -139,7 +139,12 @@ func (dnd *dnd) run_loop() (err error) {
debugprintln("dnd kitten exiting with error: ", err) debugprintln("dnd kitten exiting with error: ", err)
} }
}() }()
base_dir, err := os.Getwd() base_dir := dnd.opts.DropDest
if base_dir == "" {
base_dir, err = os.Getwd()
} else {
base_dir, err = filepath.Abs(base_dir)
}
if err != nil { if err != nil {
return err return err
} }

View File

@@ -20,6 +20,10 @@ it will prevent that MIME type being dropped, useful to disable accepting text/p
text/uri-list. text/uri-list.
--drop-dest
Path to the directory in which dropped data is saved. Defaults to the current working directory.
--confirm-drop-overwrite --confirm-drop-overwrite
type=bool-set type=bool-set
Ask for confirmation when dropping text/uri-list data if the drop will cause any existing Ask for confirmation when dropping text/uri-list data if the drop will cause any existing