2019-07-20 06:02:30 +00:00
|
|
|
import os
|
2019-07-18 17:40:48 +00:00
|
|
|
from . import identifyhome
|
|
|
|
import dbcreator, filepaths
|
|
|
|
home = identifyhome.identify_home()
|
|
|
|
|
2019-07-20 06:02:30 +00:00
|
|
|
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)
|
2019-07-25 16:14:13 +00:00
|
|
|
if not os.path.exists(filepaths.contacts_location):
|
|
|
|
os.mkdir(filepaths.contacts_location)
|
2019-07-18 17:40:48 +00:00
|
|
|
|
2019-07-20 06:02:30 +00:00
|
|
|
for db in dbcreator.create_funcs:
|
|
|
|
try:
|
|
|
|
db()
|
|
|
|
except FileExistsError:
|
|
|
|
pass
|