mirror of
https://github.com/elliotnunn/supermario.git
synced 2025-02-16 14:30:32 +00:00
10 lines
318 B
Python
10 lines
318 B
Python
from os import path
|
|
|
|
def folder(default_search, user_input):
|
|
if path.sep in user_input or user_input in ('..', '.'):
|
|
return user_input
|
|
else:
|
|
the_path = path.dirname(path.dirname(path.abspath(__file__)))
|
|
the_path = path.join(the_path, default_search, user_input)
|
|
return the_path
|