From 5998395a0157428b031bf0bece9163e9853b8bdf Mon Sep 17 00:00:00 2001
From: "pavel.uhanov" <pavel.uhanov@demlabs.net>
Date: Tue, 5 Nov 2024 05:21:48 +0000
Subject: [PATCH] hotfix-9311

---
 modules/wallet/dap_chain_wallet.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/wallet/dap_chain_wallet.c b/modules/wallet/dap_chain_wallet.c
index a33348a5ee..5ca2f079d1 100644
--- a/modules/wallet/dap_chain_wallet.c
+++ b/modules/wallet/dap_chain_wallet.c
@@ -312,10 +312,14 @@ int dap_chain_wallet_init()
 
     if ( !(l_dir = opendir(c_wallets_path)) ) {                               /* Path is not exist ? Create the dir and exit */
 #ifdef _WIN32
-        mkdir(c_wallets_path);
+        int l_res = mkdir(c_wallets_path);
 #else
-        mkdir(c_wallets_path, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
+        int l_res = mkdir(c_wallets_path, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
 #endif
+        if (l_res) {
+            log_it(L_ERROR, "Can't create wallet dir %s", c_wallets_path);
+            return l_res;
+        }
         return  0;
     }
 
-- 
GitLab