Skip to content

Commit f5d8857

Browse files
committed
Make loader start at /switch/
1 parent 656c896 commit f5d8857

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

main.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ def confirmation_prompt(program_name: str):
3636

3737

3838
if __name__ == '__main__':
39+
os.chdir(os.pardir)
40+
3941
while True:
4042
clear_terminal()
41-
dirs = ["../"] + glob("*/")
42-
scripts = glob("*.py")
43+
dirs = [os.pardir + '/'] + glob('*/')
44+
scripts = glob('*.py')
4345
if os.getcwd() == PYNX_DIR_PATH and MAIN_PY in scripts:
4446
scripts.remove(MAIN_PY)
4547
for _dir in dirs:
@@ -52,7 +54,7 @@ def confirmation_prompt(program_name: str):
5254
clear_terminal()
5355
if selected in dirs:
5456
os.chdir(selected)
55-
if os.path.isfile(MAIN_PY) and not selected == '../' and not os.getcwd() == PYNX_DIR_PATH:
57+
if os.path.isfile(MAIN_PY) and not selected == os.pardir + '/' and not os.getcwd() == PYNX_DIR_PATH:
5658
response = confirmation_prompt(selected)
5759
clear_terminal()
5860
if response is True:

0 commit comments

Comments
 (0)