This commit is contained in:
Kovid Goyal 2025-06-03 20:44:06 +05:30
parent 6880ecaa28
commit a783d4932e
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -51,7 +51,7 @@ func (h *Handler) initialize_save_file_name() {
if len(h.state.selections) > 0 {
if q, err := filepath.Abs(h.state.selections[0]); err == nil {
if s, err := os.Stat(q); err == nil {
if s.IsDir() && h.state.mode.OnlyDirs() {
if s.IsDir() == h.state.mode.OnlyDirs() {
cdir = filepath.Dir(q)
fname = filepath.Base(q)
}