| 58 | } |
| 59 | |
| 60 | std::string get_current_dir ( |
| 61 | ) |
| 62 | { |
| 63 | // need to lock a mutex here because getting and setting the |
| 64 | // current working directory is not thread safe on windows. |
| 65 | auto_mutex lock(cwd_mutex()); |
| 66 | char buf[1024]; |
| 67 | if (GetCurrentDirectoryA(sizeof(buf),buf) == 0) |
| 68 | { |
| 69 | return std::string(); |
| 70 | } |
| 71 | else |
| 72 | { |
| 73 | return std::string(buf); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | // ---------------------------------------------------------------------------------------- |
| 78 |
nothing calls this directly
no outgoing calls
no test coverage detected