mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
修复global_tmp_path可能不是绝对路径的问题
This commit is contained in:
parent
db1c873999
commit
5c3125af36
@ -24,7 +24,7 @@ class OptionsManager(object):
|
||||
self._conf = ConfigParser()
|
||||
self._conf.read(self.path, encoding='utf-8')
|
||||
if 'global_tmp_path' not in self.get_option('paths') or not self.get_value('paths', 'global_tmp_path'):
|
||||
global_tmp_path = f'{str(Path(__file__).parent)}\\tmp'
|
||||
global_tmp_path = str((Path(__file__).parent / 'tmp').absolute())
|
||||
Path(global_tmp_path).mkdir(parents=True, exist_ok=True)
|
||||
self.set_item('paths', 'global_tmp_path', global_tmp_path)
|
||||
self.save()
|
||||
|
Loading…
x
Reference in New Issue
Block a user