KeysFiles: relative file path support

This commit is contained in:
xiphon 2020-07-28 17:38:03 +00:00
parent c137a6ea36
commit eb924a34d1

View file

@ -46,7 +46,7 @@
WalletKeysFiles::WalletKeysFiles(const QFileInfo &info, quint8 networkType, QString address) WalletKeysFiles::WalletKeysFiles(const QFileInfo &info, quint8 networkType, QString address)
: m_fileName(info.fileName()) : m_fileName(info.fileName())
, m_modified(info.lastModified().toSecsSinceEpoch()) , m_modified(info.lastModified().toSecsSinceEpoch())
, m_path(QDir::toNativeSeparators(info.absoluteFilePath())) , m_path(QDir::toNativeSeparators(info.filePath()))
, m_networkType(networkType) , m_networkType(networkType)
, m_address(std::move(address)) , m_address(std::move(address))
{ {
@ -120,7 +120,7 @@ void WalletKeysFilesModel::findWallets(const QString &moneroAccountsDir)
continue; continue;
} }
QString wallet(keysFileinfo.absolutePath() + QDir::separator() + keysFileinfo.baseName()); QString wallet(keysFileinfo.path() + QDir::separator() + keysFileinfo.baseName());
quint8 networkType = NetworkType::MAINNET; quint8 networkType = NetworkType::MAINNET;
QString address = QString(""); QString address = QString("");