upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5bd4028..6fd8c82 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2497,11 +2497,21 @@ string GetAppDir()
2497 { 2497 {
2498 return "."; 2498 return ".";
2499 } 2499 }
2500 static bool fMkdirDone; 2500 static string strCreatedBaseDir;
2501 if (!fMkdirDone) 2501 if (strCreatedBaseDir != strDir)
2502 { 2502 {
2503 fMkdirDone = true;
2504 _mkdir(strDir.c_str()); 2503 _mkdir(strDir.c_str());
2504 strCreatedBaseDir = strDir;
2505 }
2506 if (IsTestNet())
2507 {
2508 strDir += "/testnet";
2509 static string strCreatedTestnetDir;
2510 if (strCreatedTestnetDir != strDir)
2511 {
2512 _mkdir(strDir.c_str());
2513 strCreatedTestnetDir = strDir;
2514 }
2505 } 2515 }
2506 return strDir; 2516 return strDir;
2507} 2517}