diff options
author | mboelen <michael@cisofy.com> | 2015-12-21 13:26:00 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2015-12-21 13:26:00 +0300 |
commit | a59731405fc9d3552c463bec23c7e284bab32e50 (patch) | |
tree | ebf129143f993bd39b4d52c710442a38789f78db /include/functions | |
parent | 526c519300868dab2560aa48e97a7b1a66f69307 (diff) |
Comment out unused function RealFilename
Diffstat (limited to 'include/functions')
-rw-r--r-- | include/functions | 61 |
1 files 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 + # } ################################################################################ |