Skip to content

Commit

Permalink
fix: replaces the deprecated wmic command
Browse files Browse the repository at this point in the history
the wmic disabled by default since Win11 24H2
  • Loading branch information
dyphire authored Dec 14, 2024
1 parent 6a1c0e9 commit 0da6b82
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/uosc/lib/menus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,12 @@ function open_file_navigation_menu(directory_path, handle_activate, opts)
name = 'subprocess',
capture_stdout = true,
playback_only = false,
args = {'wmic', 'logicaldisk', 'get', 'name', '/value'},
args = {'fsutil', 'fsinfo', 'drives'},
})
local items, selected_index = {}, 1

if process.status == 0 then
for _, value in ipairs(split(process.stdout, '\n')) do
local drive = string.match(value, 'Name=([A-Z]:)')
for drive in process.stdout:gmatch("%a:") do
if drive then
local drive_path = normalize_path(drive)
items[#items + 1] = {
Expand Down

0 comments on commit 0da6b82

Please sign in to comment.