mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-16 17:27:38 +00:00
Tails: use feather_data instead of .feather
This commit is contained in:
parent
69a13449fa
commit
f22d1ff2ac
2 changed files with 22 additions and 4 deletions
|
@ -110,14 +110,25 @@ QString defaultWalletDir() {
|
|||
|
||||
if (TailsOS::detect()) {
|
||||
QString path = []{
|
||||
// Starting in 1.1.0 the wallet and config directory were moved from ./.feather to ./feather_data
|
||||
// A user might accidentally delete the folder containing the file hidden folder after moving the AppImage
|
||||
// We return the old path if it still exists
|
||||
|
||||
QString appImagePath = qgetenv("APPIMAGE");
|
||||
if (appImagePath.isEmpty()) {
|
||||
qDebug() << "Not an appimage, using currentPath()";
|
||||
return QDir::currentPath() + "/.feather/Monero/wallets";
|
||||
if (QDir(QDir::currentPath() + "/.feather").exists()) {
|
||||
return QDir::currentPath() + "/.feather/Monero/wallets";
|
||||
}
|
||||
return QDir::currentPath() + "/feather_data/wallets";
|
||||
}
|
||||
|
||||
QFileInfo appImageDir(appImagePath);
|
||||
return appImageDir.absoluteDir().path() + "/.feather/Monero/wallets";
|
||||
QString absolutePath = appImageDir.absoluteDir().path();
|
||||
if (QDir(absolutePath + "/.feather").exists()) {
|
||||
return absolutePath + "/.feather/Monero/wallets";
|
||||
}
|
||||
return absolutePath + "/feather_data/wallets";
|
||||
}();
|
||||
|
||||
return path;
|
||||
|
|
|
@ -176,11 +176,18 @@ QDir Config::defaultConfigDir() {
|
|||
QString appImagePath = qgetenv("APPIMAGE");
|
||||
if (appImagePath.isEmpty()) {
|
||||
qDebug() << "Not an appimage, using currentPath()";
|
||||
return QDir::currentPath() + "/.feather/.config/feather";
|
||||
if (QDir(QDir::currentPath() + "/.feather").exists()) {
|
||||
return QDir::currentPath() + "/.feather/.config/feather";
|
||||
}
|
||||
return QDir::currentPath() + "/feather_data";
|
||||
}
|
||||
|
||||
QFileInfo appImageDir(appImagePath);
|
||||
return appImageDir.absoluteDir().path() + "/.feather/.config/feather";
|
||||
QString absolutePath = appImageDir.absoluteDir().path();
|
||||
if (QDir(absolutePath + "/.feather").exists()) {
|
||||
return absolutePath + "/.feather/.config/feather";
|
||||
}
|
||||
return absolutePath + "/feather_data";
|
||||
}();
|
||||
|
||||
return QDir(path);
|
||||
|
|
Loading…
Reference in a new issue