File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3329,16 +3329,15 @@ get_file() {
33293329
33303330
33313331test_file () {
3332- local mode file real_file retcode find_result_stdout find_result_stderr
3332+ local mode file real_file
33333333 mode=" ${1} "
33343334 file=" ${2} "
33353335 # # 'realpath' needs to be able to access the path it checks.
33363336 real_file=" $( root_cmd_loglevel=" echo" dry_run=0 root_cmd realpath -- " ${file} " ) "
33373337 # # 'find' needs to start execution in a directory it can access.
3338- # # 'find' is used for debugging only .
3338+ # # But we are no longer using find. Maybe no longer needed .
33393339 pushd / > /dev/null
33403340 if [ " ${mode} " = ' -f' ]; then
3341- find_result=" $( run_as_target_user find " ${real_file} " -maxdepth 0 -follow -type f 2>&1 ) " || true
33423341 if run_as_target_user /usr/bin/test -f " ${real_file} " ; then
33433342 popd > /dev/null
33443343 return 0
@@ -3347,7 +3346,6 @@ test_file() {
33473346 return 1
33483347 fi
33493348 elif [ " ${mode} " = ' -d' ]; then
3350- find_result=" $( run_as_target_user find " ${real_file} " -maxdepth 0 -follow -type d 2>&1 ) " || true
33513349 if run_as_target_user /usr/bin/test -d " ${real_file} " ; then
33523350 popd > /dev/null
33533351 return 0
@@ -3372,7 +3370,6 @@ test_file() {
33723370 return 1
33733371 fi
33743372 elif [ " ${mode} " = ' -e' ]; then
3375- find_result=" $( run_as_target_user find " ${real_file} " -maxdepth 0 2>&1 ) " || true
33763373 if run_as_target_user /usr/bin/test -e " ${real_file} " ; then
33773374 popd > /dev/null
33783375 return 0
You can’t perform that action at this time.
0 commit comments