Allow pop_to_top() to handle git trees and other variations.
This commit is contained in:
parent
8bb915ddaf
commit
e509631392
1 changed files with 2 additions and 1 deletions
|
@ -13,7 +13,8 @@ def pop_to_top(whoami):
|
|||
upwards = os.getcwd().split(os.sep)
|
||||
upwards.reverse()
|
||||
for pathpart in upwards:
|
||||
if pathpart == "wesnoth":
|
||||
# Loose match because people have things like git trees.
|
||||
if pathpart.find("wesnoth"):
|
||||
break
|
||||
else:
|
||||
os.chdir("..")
|
||||
|
|
Loading…
Add table
Reference in a new issue