Verified Commit 2e2b31e0 authored by Oliver Smith's avatar Oliver Smith
Browse files

tinydm-run-session: fix crash with empty env dir (MR 10)

Fix crash if /etc/tinydm.d/env-wayland.d dir exists (as created by
Makefile) but is empty:

  tinydm: sourcing file: /etc/tinydm.d/env-wayland.d/*
  /usr/bin/tinydm-run-session: .: line 38: can't open '/etc/tinydm.d/env-wayland.d/*': No such file or directory

Fixes: a7b0eaf3 ("Add support for sourcing env profiles based on session type")
parent a7b0eaf3
Pipeline #321126886 passed with stage
in 12 seconds
......@@ -30,9 +30,11 @@ source_session_profiles() {
exit 1
fi
[ ! -d "/etc/tinydm.d/env-${session_type}.d" ] && return
for file in "/etc/tinydm.d/env-${session_type}.d/"*; do
if ! [ -e "$file" ]; then
continue
fi
echo "tinydm: sourcing file: $file"
# shellcheck disable=SC1090
. "$file"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment