From fbf76af2c5a03ffdd70e769ff065e911903816ab Mon Sep 17 00:00:00 2001 From: Thorsten Hempel <42150441+thohemp@users.noreply.github.com> Date: Mon, 7 Jun 2021 18:46:25 +0200 Subject: [PATCH] Update wallet backup access (#7300) --- electrum/gui/kivy/main_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/gui/kivy/main_window.py b/electrum/gui/kivy/main_window.py index d12c93cd9..8c828a243 100644 --- a/electrum/gui/kivy/main_window.py +++ b/electrum/gui/kivy/main_window.py @@ -1335,7 +1335,6 @@ class ElectrumWindow(App, Logger): self.show_error(_("Backup NOT saved. Backup directory not configured.")) return - backup_dir = util.android_backup_dir() from android.permissions import request_permissions, Permission def cb(permissions, grant_results: Sequence[bool]): if not grant_results or not grant_results[0]: @@ -1343,6 +1342,7 @@ class ElectrumWindow(App, Logger): return # note: Clock.schedule_once is a hack so that we get called on a non-daemon thread # (needed for WalletDB.write) + backup_dir = util.android_backup_dir() Clock.schedule_once(lambda dt: self._save_backup(backup_dir)) request_permissions([Permission.WRITE_EXTERNAL_STORAGE], cb)