Skip to content

Commit

Permalink
Merge pull request #88 from felddy/improvement/issue_patch
Browse files Browse the repository at this point in the history
Add hotfix for routePrefix issue 3817.
  • Loading branch information
felddy authored Oct 16, 2020
2 parents d4e89e0 + 6d40735 commit 273870e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions patches/hotfix_issue_3817-0.7.4.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

# Issue Hotfix
# =====================
# Corrects routePrefix problem detailed in issue 3817
# https://gitlab.com/foundrynet/foundryvtt/-/issues/3817

# s/const view = url\.pathname\.replace(`\/\${ROUTE_PREFIX}`, "");\
# /const view = url.pathname.split("\/").pop();/g

PATCH_DEST="$FOUNDRY_HOME/resources/app/public/scripts/foundry.js"
PATCH_DOC_URL="https://gitlab.com/foundrynet/foundryvtt/-/issues/3817#note_430588341"
PATCH_NAME="Issue 3817 Hotfix for 0.7.4"
TARGET_FOUNDRY_VERSION="0.7.4"

if [ "$FOUNDRY_VERSION" = "$TARGET_FOUNDRY_VERSION" ]; then
log "Applying \"${PATCH_NAME}\""
log "See: ${PATCH_DOC_URL}"
sed --file=- --in-place=.orig "${PATCH_DEST}" << SED_SCRIPT
s/const view = url\.pathname\.replace(\`\/\${ROUTE_PREFIX}\`, "");\
/const view = url.pathname.split("\/").pop();/g
SED_SCRIPT
else
log_warn "Not applying \"${PATCH_NAME}\". This patch is targeted for Foundry Virtual Tabletop ${TARGET_FOUNDRY_VERSION}"
fi

0 comments on commit 273870e

Please sign in to comment.