diff --git a/addons/winroot.lua b/addons/winroot.lua index 13da117..27d91fa 100644 --- a/addons/winroot.lua +++ b/addons/winroot.lua @@ -17,12 +17,12 @@ local function get_drives() name = 'subprocess', playback_only = false, capture_stdout = true, - args = {'wmic', 'logicaldisk', 'get', 'caption'} + args = {'fsutil', 'fsinfo', 'drives'} }) if result.status ~= 0 then return msg.error('could not read windows root') end local root = {} - for drive in result.stdout:gmatch("%a:") do + for drive in result.stdout:gmatch("(%a:)\\") do table.insert(root, drive..'/') end return root