MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / dds_chdir

Function dds_chdir

dds/DCPS/FileSystemStorage.cpp:119–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119int dds_chdir(const ACE_TCHAR* path)
120{
121 // In all the other cases we are going to \\?\<absolute> long paths, but
122 // SetCurrentDirectory() doesn't allow this workaround.
123 ACE_WString wpath = to_win32_long_path(path);
124 wchar_t spath[MAX_PATH];
125
126 if (0 == ::GetShortPathNameW(wpath.c_str(), spath, MAX_PATH)) {
127 throw std::runtime_error("GetShortPathNameW failed.");
128 }
129
130 return ::_wchdir(spath);
131}
132
133bool is_dir(const ACE_TCHAR* path)
134{

Callers 3

CwdGuardMethod · 0.85
~CwdGuardMethod · 0.85
make_new_subdirMethod · 0.85

Calls 1

to_win32_long_pathFunction · 0.85

Tested by

no test coverage detected