From 8d6fe73cc4058d0716deb452dee7fc9cd91549c3 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 15 Jan 2017 22:00:45 +0100 Subject: [PATCH] Attempt for fix fn_remove_cfg_files --- lgsm/functions/mods_core.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index b5e441b5e..294193237 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -95,17 +95,15 @@ fn_remove_cfg_files(){ for ((removefilesindex=1; removefilesindex < ${removefilesamount}; removefilesindex++)); do # Put current file we're looking for into a variable filetoremove="$( echo "${modkeepfiles}" | awk -F ';' -v x=${removefilesindex} '{ print $x }' )" - echo "Testing ${filetoremove}" # If it matches an existing file that have been extracted if [ -f "${extractdir}/${filetoremove}" ]||[ -d "${extractdir}/${filetoremove}" ]; then - echo "Removing ${extractdir}/${filetoremove}" # Then delete the file! rm -R "${extractdir}/${filetoremove}" # Write this file path in a tmp file, to rebuild a full file list if [ ! -f "${modsdatadir}/.removedfiles.tmp" ]; then touch "${modsdatadir}/.removedfiles.tmp" fi - echo "${removefiletest}" > "${modsdatadir}/.removedfiles.tmp" + echo "${filetoremove}" > "${modsdatadir}/.removedfiles.tmp" fi done fi