From 0cf27b9e9e1edcd95b68d6bd3c44b7e9687f509c Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 2 Mar 2026 09:24:03 +0100 Subject: [PATCH] fix: SSH Provider size detection not working correctly --- plugins/remote/source/content/helpers/sftp_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/remote/source/content/helpers/sftp_client.cpp b/plugins/remote/source/content/helpers/sftp_client.cpp index 668508601..989d1d4b4 100644 --- a/plugins/remote/source/content/helpers/sftp_client.cpp +++ b/plugins/remote/source/content/helpers/sftp_client.cpp @@ -319,7 +319,7 @@ namespace hex::plugin::remote { : RemoteFile(mode), m_handle(handle) { m_readCommand = fmt::format("dd if=\"{0}\" skip={{0}} count={{1}} bs=1", path); m_writeCommand = fmt::format("dd of=\"{0}\" seek={{0}} count={{1}} bs=1 conv=notrunc", path); - m_sizeCommand = "stat -c%s {0}"; + m_sizeCommand = fmt::format("(fdisk -l \"{0}\" | head -n 1 | cut -d',' -f2 | cut -d' ' -f2) || (stat -c%s \"{0}\")", path); } RemoteFileSSH::~RemoteFileSSH() {