Check full path of directories

This commit is contained in:
Jeremy Gardais 2022-03-28 14:22:49 +02:00
parent d50bb47358
commit f2f4bf82aa
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 5 additions and 5 deletions

View File

@ -146,18 +146,18 @@ main() { # {{{
while IFS= read -r dir; do
### Get owner information {{{
debug_message "while loop - Try to get ${RED}${dir}${COLOR_DEBUG} owner information."
dir_owner_name="$(stat -c "%U" "${dir}" \
|| error_message "Can't stat ${dir} directory." 20)"
dir_owner_name="$(stat -c "%U" "${path_to_check}/${dir}" \
|| error_message "Can't stat ${path_to_check}/${dir} directory." 20)"
### }}}
### If owner is UNKNOWN {{{
if [ "${dir_owner_name}" = "UNKNOWN" ]; then
debug_message "while loop - Owner of ${dir} directory is no longer available on this system (${RED}${dir_owner_name}${COLOR_DEBUG})."
debug_message "while loop - Owner of ${path_to_check}/${dir} directory is no longer available on this system (${RED}${dir_owner_name}${COLOR_DEBUG})."
### Add this directory to specific list
printf '%b\n' "${dir}" >> "${unknow_dir_list_path}"
printf '%b\n' "${path_to_check}/${dir}" >> "${unknow_dir_list_path}"
### }}}
### If owner is known from the system {{{
else
debug_message "while loop - Owner of ${dir} directory is ${RED}${dir_owner_name}${COLOR_DEBUG}, skip this directory."
debug_message "while loop - Owner of ${path_to_check}/${dir} directory is ${RED}${dir_owner_name}${COLOR_DEBUG}, skip this directory."
fi
### }}}
done < "${full_dir_list_path}"