Skip to content

Commit

Permalink
Fix case when code_swarm is not a symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
holzman committed May 31, 2013
1 parent 6ee8f9a commit 386f106
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/code_swarm
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ def main():

def root_path():
"Returns the path of the code_swarm source directory"
real_path = os.path.join(os.path.dirname(__file__), os.readlink(__file__))
real_file = __file__
if os.path.islink():
real_file = os.readlink(__file__)

real_path = os.path.join(os.path.dirname(real_file))
return os.path.dirname(real_path)


Expand Down

0 comments on commit 386f106

Please sign in to comment.