mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user