| 77 | // ---------------------------------------------------------------------------------------- |
| 78 | |
| 79 | void set_current_dir ( |
| 80 | const std::string& new_dir |
| 81 | ) |
| 82 | { |
| 83 | // need to lock a mutex here because getting and setting the |
| 84 | // current working directory is not thread safe on windows. |
| 85 | auto_mutex lock(cwd_mutex()); |
| 86 | if (SetCurrentDirectoryA(new_dir.c_str()) == 0) |
| 87 | { |
| 88 | throw set_current_dir_error("Error changing current dir to '" + new_dir + "'"); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | // ---------------------------------------------------------------------------------------- |
| 93 |
nothing calls this directly
no test coverage detected