create download directory if it doesn't exist

This commit is contained in:
Kay Kurokawa 2017-03-20 11:47:03 -04:00 committed by Alex Grintsvayg
parent c18c1725c4
commit 7fac63a37b
2 changed files with 3 additions and 0 deletions

View file

@ -21,6 +21,7 @@ at anytime.
### Fixed ### Fixed
* Fix restart procedure in DaemonControl * Fix restart procedure in DaemonControl
* *
* Create download directory if it doesn't exist
* *
## [0.9.2rc1] - 2017-03-21 ## [0.9.2rc1] - 2017-03-21

View file

@ -232,6 +232,8 @@ class Daemon(AuthJSONRPCServer):
conf.settings.update(last_version) conf.settings.update(last_version)
self.db_dir = conf.settings['data_dir'] self.db_dir = conf.settings['data_dir']
self.download_directory = conf.settings['download_directory'] self.download_directory = conf.settings['download_directory']
if not os.path.exists(self.download_directory):
os.mkdir(self.download_directory)
self.created_data_dir = False self.created_data_dir = False
if not os.path.exists(self.db_dir): if not os.path.exists(self.db_dir):
os.mkdir(self.db_dir) os.mkdir(self.db_dir)