gkngkc / UnityStandaloneFileBrowser

A native file browser for unity standalone platforms
MIT License
2.01k stars 317 forks source link

Crash when trying to open root directory #32

Open ozonexo3 opened 6 years ago

ozonexo3 commented 6 years ago

https://github.com/gkngkc/UnityStandaloneFileBrowser/blob/def85a6d7fe6af4ee0b4f2693a62d321ba511a14/Assets/StandaloneFileBrowser/StandaloneFileBrowserWindows.cs#L129

It crash for "C://" directory. We can add that before to fix it:

            if (System.IO.Path.GetPathRoot(directoryPath) == directoryPath)
                return directoryPath;