fixed error with python version using the wrong path for the user data folder.
This commit is contained in:
parent
d6d3f7aebc
commit
b2c2a6135d
6
run.py
6
run.py
@ -1,8 +1,12 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import pathlib
|
||||||
|
|
||||||
root_folder = os.path.dirname(__file__)
|
|
||||||
|
root_folder = pathlib.Path().absolute()
|
||||||
|
if not os.path.isdir(os.path.join(root_folder, "dashmachine", "user_data")):
|
||||||
|
os.mkdir(os.path.join(root_folder, "dashmachine", "user_data"))
|
||||||
db_file_path = os.path.join(root_folder, "dashmachine", "user_data", "site.db")
|
db_file_path = os.path.join(root_folder, "dashmachine", "user_data", "site.db")
|
||||||
try:
|
try:
|
||||||
os.remove(db_file_path)
|
os.remove(db_file_path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user