Skip to content

Commit

Permalink
Fix locating paths in htdocs that contain "content"
Browse files Browse the repository at this point in the history
  • Loading branch information
puigru committed Jan 18, 2021
1 parent 1e639cc commit 3e88ae3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bluezip.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import json
import time
import sys
import re
import os

import yaml
Expand Down Expand Up @@ -162,7 +163,7 @@ def cleanup_obsolete(self, game, sha):
exclude = self.settings['obsolete_exclude'].split(',')
obsolete = list()
for (fname,) in c:
contentless = fname.replace('content/', '')
contentless = re.sub('^content/', '', fname)
path = os.path.abspath(os.path.join(htdocs, contentless))
rel = os.path.relpath(path, htdocs)
if os.path.isfile(path):
Expand Down

0 comments on commit 3e88ae3

Please sign in to comment.