From a59731405fc9d3552c463bec23c7e284bab32e50 Mon Sep 17 00:00:00 2001 From: mboelen Date: Mon, 21 Dec 2015 11:26:00 +0100 Subject: [PATCH] Comment out unused function RealFilename --- include/functions | 61 ++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/include/functions b/include/functions index b16572e8..e0f6b48c 100644 --- a/include/functions +++ b/include/functions @@ -1094,36 +1094,37 @@ # Name : RealFilename() # Description : Return file behind a symlink # Returns : sFILE - RealFilename() - { - sFILE=$1 - FileIsWorldExecutable="" - SYMLINK=0 - - # Check for symlink - if [ -L ${sFILE} ]; then - if [ ! "${READLINKBINARY}" = "" ]; then - tFILE=`${READLINKBINARY} -f ${sFILE}` - # Check if we can find the file now - if [ -f ${tFILE} ]; then - rFILE="${tFILE}" - logtext "Result: symlink found, pointing to ${sFILE}" - SYMLINK=1 - else - # Check the full path of the symlink, strip the filename, copy the path and linked filename together - tDIR=`echo ${sFILE} | awk '{match($1, "^.*/"); print substr($1, 1, RLENGTH-1)}'` - tFILE="${tDIR}/${tFILE}" - if [ -f ${tFILE} ]; then - rFILE="${tFILE}" - logtext "Result: symlink found, seems to be ${rFILE}" - fi - fi - fi - else - # No symlink - rFILE="${sFILE}" - fi - } + # Notes : This function is unused, use ShowSymlinkPath instead + #RealFilename() + # { + # sFILE=$1 + # FileIsWorldExecutable="" + # SYMLINK=0 + # + # # Check for symlink + # if [ -L ${sFILE} ]; then + # if [ ! "${READLINKBINARY}" = "" ]; then + # tFILE=`${READLINKBINARY} -f ${sFILE}` + # # Check if we can find the file now + # if [ -f ${tFILE} ]; then + # rFILE="${tFILE}" + # logtext "Result: symlink found, pointing to ${sFILE}" + # SYMLINK=1 + # else + # # Check the full path of the symlink, strip the filename, copy the path and linked filename together + # tDIR=`echo ${sFILE} | awk '{match($1, "^.*/"); print substr($1, 1, RLENGTH-1)}'` + # tFILE="${tDIR}/${tFILE}" + # if [ -f ${tFILE} ]; then + # rFILE="${tFILE}" + # logtext "Result: symlink found, seems to be ${rFILE}" + # fi + # fi + # fi + # else + # # No symlink + # rFILE="${sFILE}" + # fi + # } ################################################################################