Skip to content

Commit

Permalink
Copy map file case insensitively
Browse files Browse the repository at this point in the history
  • Loading branch information
klightspeed committed Jul 18, 2021
1 parent 062b892 commit a5fb3dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/arkmanager
Expand Up @@ -3026,11 +3026,13 @@ doBackup(){
echo "${NORMAL}\e[68G[ ${YELLOW}WARN${NORMAL} ]"
logprint "Saved ark file not found, but temporary file was"
else
echo "${NORMAL}\e[68G[ ${RED}FAILED${NORMAL} ]"
cimapfile="$(find "${savedir}" -maxdepth 1 -iname "${mapname}.ark" -or -iname "${mapname}.tmp" | head -n1)"
if [ -n "${cimapfile}" ]; then
echo "${NORMAL}\e[68G[ ${YELLOW}WARN${NORMAL} ]"
logprint "Inconsistent casing in map name - ${mapname}.ark does not exist, but ${cimapfile##*/} does"
cp -p "${cimapfile}" "${backupdir}/${mapname}.ark"
else
echo "${NORMAL}\e[68G[ ${RED}FAILED${NORMAL} ]"
logprint "Saved ark file could not be found"
logprint "Candidates:"
for f in "${savedir}"/*.ark; do
Expand Down

0 comments on commit a5fb3dc

Please sign in to comment.