Fix '..' in resolve_path_wc

git-svn-id: https://kippo.googlecode.com/svn/trunk@75 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
desaster
2009-11-24 21:46:01 +00:00
parent aa451bc2fd
commit 51da3b27fd

View File

@@ -60,7 +60,7 @@ class HoneyPotFilesystem(object):
elif p[0] == '.':
foo(p[1:], cwd)
elif p[0] == '..':
foo(p[1:], cwd[1:])
foo(p[1:], cwd[:-1])
else:
names = [x[A_NAME] for x in self.get_path('/'.join(cwd))]
matches = [x for x in names if fnmatch.fnmatchcase(x, p[0])]