makedirs, not mkdirs
parent
4fcf3d69cd
commit
b49199c7d1
|
@ -96,15 +96,11 @@ def check():
|
||||||
Checks if the configuration file exists, creates it if not
|
Checks if the configuration file exists, creates it if not
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
if not os.path.exists(os.path.dirname(get_config_file())):
|
||||||
if not os.path.exists(os.path.dirname(get_config_file())):
|
os.path.makedirs(os.path.dirname(get_config_file()))
|
||||||
os.path.mkdirs(os.path.dirname(get_config_file()))
|
if not os.path.isfile(get_config_file()):
|
||||||
if not os.path.isfile(get_config_file()):
|
open(get_config_file(), 'a', encoding="utf8").close()
|
||||||
open(get_config_file(), 'a', encoding="utf8").close()
|
save()
|
||||||
save()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
#logger.debug('Failed to check configuration file.')
|
|
||||||
|
|
||||||
def save():
|
def save():
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -77,10 +77,9 @@ class Onionr:
|
||||||
logger.error('Tor is not installed')
|
logger.error('Tor is not installed')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# If data folder does not exist
|
# If block data folder does not exist
|
||||||
if not data_exists:
|
if not os.path.exists(self.dataDir + 'blocks/'):
|
||||||
if not os.path.exists(self.dataDir + 'blocks/'):
|
os.mkdir(self.dataDir + 'blocks/')
|
||||||
os.mkdir(self.dataDir + 'blocks/')
|
|
||||||
|
|
||||||
# Copy default plugins into plugins folder
|
# Copy default plugins into plugins folder
|
||||||
if not os.path.exists(plugins.get_plugins_folder()):
|
if not os.path.exists(plugins.get_plugins_folder()):
|
||||||
|
|
Loading…
Reference in New Issue