Fix error while getting drives in file system resource manager on Windows.

This commit is contained in:
2023-12-02 00:28:47 +08:00
parent 01b162883d
commit 6e01b255a6

View File

@@ -36,7 +36,7 @@ namespace Cryville.Crtr.Browsing {
if (_dirParts.Count == 0) {
IEnumerable<FileSystemEntry> items;
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
items = DriveInfo.GetDrives().Select(d => new FileSystemEntry(d.RootDirectory));
items = Directory.GetLogicalDrives().Select(d => new FileSystemEntry(new DirectoryInfo(d)));
#elif UNITY_ANDROID
items = new FileSystemEntry[] { new FileSystemEntry("Storage", new DirectoryInfo("/sdcard")) };
#else