Mercurial > libervia-desktop-kivy
comparison cagou/core/platform_/android.py @ 398:a5457241c17f
android: fixed tmp dir creation if parents don't exist, avoiding a crash.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 09 Feb 2020 23:47:29 +0100 |
parents | c7f1176cd2a9 |
children | 71f51198478c |
comparison
equal
deleted
inserted
replaced
397:54f6a47cc60a | 398:a5457241c17f |
---|---|
87 # above | 87 # above |
88 assert self.tmp_dir.resolve() != local_dir | 88 assert self.tmp_dir.resolve() != local_dir |
89 # we reset tmp dir on each run, to be sure that there is no residual file | 89 # we reset tmp dir on each run, to be sure that there is no residual file |
90 if self.tmp_dir.exists(): | 90 if self.tmp_dir.exists(): |
91 shutil.rmtree(self.tmp_dir) | 91 shutil.rmtree(self.tmp_dir) |
92 self.tmp_dir.mkdir(0o700) | 92 self.tmp_dir.mkdir(0o700, parents=True) |
93 | 93 |
94 def on_initFrontendState(self): | 94 def on_initFrontendState(self): |
95 # XXX: we use a separated socket instead of bridge because if we | 95 # XXX: we use a separated socket instead of bridge because if we |
96 # try to call a bridge method in on_pause method, the call data | 96 # try to call a bridge method in on_pause method, the call data |
97 # is not written before the actual pause | 97 # is not written before the actual pause |