From 7aef58d29e651c8e30ba5a0a2d2b035a3d9f24a2 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 27 Jan 2020 13:13:47 +0800 Subject: [PATCH] luci-app-diskman: sync with upsteam source --- .../luci-app-diskman/luasrc/model/diskman.lua | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/package/ctcgfw/luci-app-diskman/luasrc/model/diskman.lua b/package/ctcgfw/luci-app-diskman/luasrc/model/diskman.lua index 5384993550..ac979849d3 100644 --- a/package/ctcgfw/luci-app-diskman/luasrc/model/diskman.lua +++ b/package/ctcgfw/luci-app-diskman/luasrc/model/diskman.lua @@ -266,13 +266,17 @@ d.get_mount_points = function() end for mount in mounts:gmatch("[^\n]+") do local device = mount:match("^([^%s]+)%s+.+") - -- only show /dev/xxx device, and not show docker root dir mounts - if device:match("/dev/") and not mount:match(dk_root_dir)then - res[#res+1] = {} - local i = 0 - for v in mount:gmatch("[^%s]+") do - i = i + 1 - res[#res][h[i]] = v + -- only show /dev/xxx device + if device and device:match("/dev/") then + -- not show docker root dir mounts + if dk_root_dir and mount and mount:match(dk_root_dir) then + else + res[#res+1] = {} + local i = 0 + for v in mount:gmatch("[^%s]+") do + i = i + 1 + res[#res][h[i]] = v + end end end end