Skip to content

Commit 171f9bf

Browse files
Fix brandon-rhodes#4: Protect against empty path with abspath()
1 parent 153be1f commit 171f9bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build/BUILD.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
split_on_tabs = re.compile(b'\t+').split
1010

1111
def main():
12-
os.chdir(os.path.dirname(__file__))
12+
os.chdir(os.path.dirname(os.path.abspath(__file__)))
1313
if not os.path.isdir('../data'):
1414
os.makedirs('../data')
1515

build/split.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def question_cell(text):
2727

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

0 commit comments

Comments
 (0)