| 2344 | } |
| 2345 | |
| 2346 | SuccessState ShellState::ChangeDirectory(const string &path) { |
| 2347 | int rc; |
| 2348 | #if defined(_WIN32) || defined(WIN32) |
| 2349 | auto z = ShellState::Win32Utf8ToUnicode(path); |
| 2350 | rc = !SetCurrentDirectoryW(z.c_str()); |
| 2351 | #else |
| 2352 | rc = chdir(path.c_str()); |
| 2353 | #endif |
| 2354 | if (rc) { |
| 2355 | PrintF(PrintOutput::STDERR, "Cannot change to directory \"%s\"\n", path); |
| 2356 | return SuccessState::FAILURE; |
| 2357 | } |
| 2358 | return SuccessState::SUCCESS; |
| 2359 | } |
| 2360 | |
| 2361 | SuccessState ShellState::ShowDatabases() { |
| 2362 | OpenDB(); |
no test coverage detected