Avoid spurious error on empty autoload folders

This commit is contained in:
Maxime Coste 2016-01-29 08:48:26 +00:00
parent f2dac6ca15
commit c27778497e

View File

@ -36,7 +36,9 @@ def -params 1 -docstring "colorscheme <name>: enable named colorscheme" \
autoload() {
dir=$1
for rcfile in ${dir}/*.kak; do
echo "try %{ source '${rcfile}' } catch %{ echo -debug Autoload: could not load '${rcfile}' }";
if [ -f "$rcfile" ]; then
echo "try %{ source '${rcfile}' } catch %{ echo -debug Autoload: could not load '${rcfile}' }";
fi
done
for subdir in ${dir}/*; do
if [ -d "$subdir" ]; then