Created attachment 224346 [details]
Macro 'BSD' is required for correct package logic. In particular function 'is_dir_fast' defined in src/utils/fs.c uses this macro to select method for checking if 'path' variable is a directory. If macro is not defined then paths to executables are detected as directories. For example, executable '/usr/local/bin/feh' is reported by 'is_dir' function as directory.
This incorrect reports lead to various bugs:
1. Files with extensions can't be opened by registered programs ( defined by filextype ). Default editor (Vim) used instead.
2. During copy directory there are error messages like 'Target path specifies existing directory'
3. Files with 'sticky bit' are displayed as directories
Working solution is to add 'BSD' macro to compilation flags in package Makefile:
CFLAGS+= -fcommon -DBSD