Check full path of directories
This commit is contained in:
parent
d50bb47358
commit
f2f4bf82aa
|
@ -146,18 +146,18 @@ main() { # {{{
|
||||||
while IFS= read -r dir; do
|
while IFS= read -r dir; do
|
||||||
### Get owner information {{{
|
### Get owner information {{{
|
||||||
debug_message "while loop - Try to get ${RED}${dir}${COLOR_DEBUG} owner information."
|
debug_message "while loop - Try to get ${RED}${dir}${COLOR_DEBUG} owner information."
|
||||||
dir_owner_name="$(stat -c "%U" "${dir}" \
|
dir_owner_name="$(stat -c "%U" "${path_to_check}/${dir}" \
|
||||||
|| error_message "Can't stat ${dir} directory." 20)"
|
|| error_message "Can't stat ${path_to_check}/${dir} directory." 20)"
|
||||||
### }}}
|
### }}}
|
||||||
### If owner is UNKNOWN {{{
|
### If owner is UNKNOWN {{{
|
||||||
if [ "${dir_owner_name}" = "UNKNOWN" ]; then
|
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
|
### 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 {{{
|
### If owner is known from the system {{{
|
||||||
else
|
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
|
fi
|
||||||
### }}}
|
### }}}
|
||||||
done < "${full_dir_list_path}"
|
done < "${full_dir_list_path}"
|
||||||
|
|
Loading…
Reference in New Issue