Onionr/onionr/utils/createdirs.py
2019-07-20 01:02:30 -05:00

16 lines
400 B
Python

import os
from . import identifyhome
import dbcreator, filepaths
home = identifyhome.identify_home()
def create_dirs():
if not os.path.exists(home):
os.mkdir(home)
if not os.path.exists(filepaths.block_data_location):
os.mkdir(filepaths.block_data_location)
for db in dbcreator.create_funcs:
try:
db()
except FileExistsError:
pass