| 818 | |
| 819 | |
| 820 | void I_OpenShellFolder(const char* infolder) |
| 821 | { |
| 822 | auto len = GetCurrentDirectoryW(0, nullptr); |
| 823 | TArray<wchar_t> curdir(len + 1, true); |
| 824 | if (!GetCurrentDirectoryW(len + 1, curdir.Data())) |
| 825 | { |
| 826 | Printf("Unable to retrieve current directory\n"); |
| 827 | } |
| 828 | else if (SetCurrentDirectoryW(WideString(infolder).c_str())) |
| 829 | { |
| 830 | if (longsavemessages) |
| 831 | Printf("Opening folder: %s\n", infolder); |
| 832 | ShellExecuteW(NULL, L"open", L"explorer.exe", L".", NULL, SW_SHOWNORMAL); |
| 833 | SetCurrentDirectoryW(curdir.Data()); |
| 834 | } |
| 835 | else |
| 836 | { |
| 837 | if (longsavemessages) |
| 838 | Printf("Unable to open directory '%s\n", infolder); |
| 839 | else |
| 840 | Printf("Unable to open requested directory\n"); |
| 841 | } |
| 842 | } |
| 843 |
nothing calls this directly
no test coverage detected