Skip to content

Commit

Permalink
Merge pull request #116 from dyphire/fix
Browse files Browse the repository at this point in the history
winroot: replaces the deprecated wmic command
  • Loading branch information
CogentRedTester authored Dec 18, 2024
2 parents 27cd7f3 + 6c57fcf commit a9f0cbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/winroot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a9f0cbb

Please sign in to comment.