fix(lite): "Open data folder" points to the actual lite wallet dir
The lite SilentDragonXLite backend stores its wallet in its own directory (dirs::data_dir()/silentdragonxlite — %APPDATA%\silentdragonxlite on Windows, ~/.silentdragonxlite on Linux, ~/Library/Application Support/silentdragonxlite on macOS), NOT the full-node getDragonXDataDir() (…/Hush/DRAGONX). The newly added lite "Open data folder" button opened the wrong (full-node) directory. Add Platform::getLiteWalletDataDir() mirroring the backend's get_zcash_data_path for the "main" chain, and point the lite button at it. The full-node button is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -219,6 +219,24 @@ std::string Platform::getDataDir()
|
||||
return getDragonXDataDir();
|
||||
}
|
||||
|
||||
std::string Platform::getLiteWalletDataDir()
|
||||
{
|
||||
// Mirror the SilentDragonXLite backend's get_zcash_data_path() for the "main" chain:
|
||||
// Windows/macOS: dirs::data_dir()/silentdragonxlite (data_dir = %APPDATA%, ~/Library/App Support)
|
||||
// Linux: ~/.silentdragonxlite
|
||||
#ifdef _WIN32
|
||||
char path[MAX_PATH];
|
||||
if (SUCCEEDED(SHGetFolderPathA(nullptr, CSIDL_APPDATA, nullptr, 0, path))) {
|
||||
return std::string(path) + "\\silentdragonxlite\\";
|
||||
}
|
||||
return getHomeDir() + "\\AppData\\Roaming\\silentdragonxlite\\";
|
||||
#elif defined(__APPLE__)
|
||||
return getHomeDir() + "/Library/Application Support/silentdragonxlite/";
|
||||
#else
|
||||
return getHomeDir() + "/.silentdragonxlite/";
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string Platform::getConfigDir()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
Reference in New Issue
Block a user