From cf0f803d1b6efda95bb07130423fed0c0a0cbb67 Mon Sep 17 00:00:00 2001 From: gray Date: Mon, 5 May 2025 17:19:35 +0100 Subject: [PATCH] Fix file transfer from Calibre to Remarkable Paper Pro (#13732) The output of df wraps on to multiple lines on the rmpp due to the device mapped mount points. Enabling the posix -P option to df prevents this and allow the output to be parsed as normal. --- frontend/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/util.lua b/frontend/util.lua index 4f7398d05..856f4fd4e 100644 --- a/frontend/util.lua +++ b/frontend/util.lua @@ -920,7 +920,7 @@ end function util.diskUsage(dir) -- safe way of testing df & awk local function doCommand(d) - local handle = io.popen("df -k " .. util.shell_escape({d}) .. " 2>/dev/null | awk '$3 ~ /[0-9]+/ { print $2,$3,$4 }' 2>/dev/null || echo ::ERROR::") + local handle = io.popen("df -kP " .. util.shell_escape({d}) .. " 2>/dev/null | awk '$3 ~ /[0-9]+/ { print $2,$3,$4 }' 2>/dev/null || echo ::ERROR::") if not handle then return end local output = handle:read("*all") handle:close()