Fixed path escaping for tanks.wq

This commit is contained in:
Paul S. Ferrell 2009-12-16 08:00:10 -07:00
parent 39d7b98852
commit 750e8f4715
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ class Pflanzarr:
tmpPlayers = os.listdir(self._playerDir)
players = []
for p in tmpPlayers:
p = unquote(p)
p = unquote(p, safe='')
if not (p.startswith('.') or p.endswith('#') or p.endswith('~'))\
and p in colors:
players.append(p)
@ -401,7 +401,7 @@ class Pflanzarr:
colors = {}
for line in file:
try:
team, passwd, color = map(unquote, line.split('\t'))
team, passwd, color = map(unquote, line.split('\t'),['']*3)
colors[team] = '#%s' % color
except:
colors[team] = errorColor

View File

@ -49,7 +49,7 @@ if team not in teams.teams:
if passwd != teams.teams[team][0]:
print('<p>Invalid password.</p>'); done()
path = os.path.join(Config.DATA_PATH, 'ai/players', quote(team) )
path = os.path.join(Config.DATA_PATH, 'ai/players', quote(team, safe='') )
file = open(path, 'w')
file.write(code)
file.close()