mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-20 20:23:57 +00:00
Support Nsi device
This commit is contained in:
@@ -2918,9 +2918,22 @@ namespace
|
||||
return filename.substr(device_prefix.size());
|
||||
}
|
||||
|
||||
if (filename.starts_with(u"\\??\\MountPointManager"))
|
||||
constexpr std::u16string_view unc_prefix = u"\\??\\";
|
||||
if (!filename.starts_with(unc_prefix))
|
||||
{
|
||||
return u"MountPointManager";
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
const auto path = filename.substr(unc_prefix.size());
|
||||
|
||||
const std::set<std::u16string, std::less<>> devices{
|
||||
u"Nsi",
|
||||
u"MountPointManager",
|
||||
};
|
||||
|
||||
if (devices.contains(path))
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
return std::nullopt;
|
||||
|
||||
Reference in New Issue
Block a user