Skip to content

Commit

Permalink
Fix brandon-rhodes#4: Protect against empty path with abspath()
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-rhodes committed Jul 14, 2015
1 parent 153be1f commit 171f9bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/BUILD.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
split_on_tabs = re.compile(b'\t+').split

def main():
os.chdir(os.path.dirname(__file__))
os.chdir(os.path.dirname(os.path.abspath(__file__)))
if not os.path.isdir('../data'):
os.makedirs('../data')

Expand Down
2 changes: 1 addition & 1 deletion build/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def question_cell(text):

def main():
session_cells = {n: [] for n in range(1, 6+1)}
f = open(os.path.dirname(__file__) + '/../All.ipynb')
f = open(os.path.dirname(os.path.abspath(__file__)) + '/../All.ipynb')
j = json.load(f)
cells = j['cells']
for cell in cells:
Expand Down

0 comments on commit 171f9bf

Please sign in to comment.