aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/oshelper.cpp6
-rw-r--r--src/main/oshelper.h1
-rw-r--r--src/p2pool/P2PoolManager.cpp24
3 files changed, 19 insertions, 12 deletions
diff --git a/src/main/oshelper.cpp b/src/main/oshelper.cpp
index 2ca0e400..cb9aca7a 100644
--- a/src/main/oshelper.cpp
+++ b/src/main/oshelper.cpp
@@ -248,6 +248,12 @@ QString OSHelper::temporaryPath() const
return QDir::tempPath();
}
+bool OSHelper::isWritableDirectory(const QString &path) const
+{
+ const QFileInfo info(path);
+ return info.exists() && info.isDir() && info.isWritable();
+}
+
QString OSHelper::randomPassword(int numBytes) const
{
numBytes = qBound(16, numBytes, 128);
diff --git a/src/main/oshelper.h b/src/main/oshelper.h
index 1c3aeb72..b6e98d32 100644
--- a/src/main/oshelper.h
+++ b/src/main/oshelper.h
@@ -51,6 +51,7 @@ public:
Q_INVOKABLE QString openSaveFileDialog(const QString &title, const QString &folder, const QString &filename) const;
Q_INVOKABLE QString temporaryFilename() const;
Q_INVOKABLE QString temporaryPath() const;
+ Q_INVOKABLE bool isWritableDirectory(const QString &path) const;
Q_INVOKABLE QString randomPassword(int numBytes = 32) const;
Q_INVOKABLE bool removeTemporaryWallet(const QString &walletName) const;
Q_INVOKABLE bool isCapsLock() const;
diff --git a/src/p2pool/P2PoolManager.cpp b/src/p2pool/P2PoolManager.cpp
index c1e580e4..64414f0c 100644
--- a/src/p2pool/P2PoolManager.cpp
+++ b/src/p2pool/P2PoolManager.cpp
@@ -55,21 +55,21 @@ void P2PoolManager::download() {
QString fileName;
QString validHash;
#ifdef Q_OS_WIN
- url = "https://github.com/SChernykh/p2pool/releases/download/v4.16/p2pool-v4.16-windows-x64.zip";
- fileName = m_p2poolPath + "/p2pool-v4.16-windows-x64.zip";
- validHash = "8f619bf215e986f8b96526a1a279b83c84b569a0916c1d19713bfb616e78160a";
+ url = "https://github.com/SChernykh/p2pool/releases/download/v4.17.1/p2pool-v4.17.1-windows-x64.zip";
+ fileName = m_p2poolPath + "/p2pool-v4.17.1-windows-x64.zip";
+ validHash = "984822dd8a4645ea68763888d2127085bbb53ed42b35e1f899883b3a35a40a76";
#elif defined(Q_OS_LINUX)
- url = "https://github.com/SChernykh/p2pool/releases/download/v4.16/p2pool-v4.16-linux-x64.tar.gz";
- fileName = m_p2poolPath + "/p2pool-v4.16-linux-x64.tar.gz";
- validHash = "1b03b2e4d4adfe488b2867eb85b57366fbaf8594a7f84cdbf13a3c8519159280";
+ url = "https://github.com/SChernykh/p2pool/releases/download/v4.17.1/p2pool-v4.17.1-linux-x64.tar.gz";
+ fileName = m_p2poolPath + "/p2pool-v4.17.1-linux-x64.tar.gz";
+ validHash = "66b67fd8c7f00d33e76b3fa8373e67a5880a530ff1812aaf39aa85298d328f6c";
#elif defined(Q_OS_MACOS_AARCH64)
- url = "https://github.com/SChernykh/p2pool/releases/download/v4.16/p2pool-v4.16-macos-aarch64.tar.gz";
- fileName = m_p2poolPath + "/p2pool-v4.16-macos-aarch64.tar.gz";
- validHash = "8e1d8c10850015c50cc4955dc3b9681007f329d51325a3a55bde700298bcfaeb";
+ url = "https://github.com/SChernykh/p2pool/releases/download/v4.17.1/p2pool-v4.17.1-macos-aarch64.tar.gz";
+ fileName = m_p2poolPath + "/p2pool-v4.17.1-macos-aarch64.tar.gz";
+ validHash = "8b8454fb4d8330b4a039d4657be69c8543a22938a8957c083512be41e27016b1";
#elif defined(Q_OS_MACOS)
- url = "https://github.com/SChernykh/p2pool/releases/download/v4.16/p2pool-v4.16-macos-x64.tar.gz";
- fileName = m_p2poolPath + "/p2pool-v4.16-macos-x64.tar.gz";
- validHash = "573b6aa9b953fb5594f7eb21b1321a8d719e181b6814f931ce54b603dc6f0663";
+ url = "https://github.com/SChernykh/p2pool/releases/download/v4.17.1/p2pool-v4.17.1-macos-x64.tar.gz";
+ fileName = m_p2poolPath + "/p2pool-v4.17.1-macos-x64.tar.gz";
+ validHash = "64657dd2ae954d41880aef98193124d1d08dfa2e991f755a9d089a35f96def13";
#endif
QFile file(fileName);
epee::net_utils::http::http_simple_client http_client;