Skip to content
This repository was archived by the owner on May 29, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion core/lib/FileDirProc/FileUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,28 @@ namespace gpstk
_mkdir(path.c_str());
return 0;
}
#else
#elif defined(__MINGW32__) || defined(__MINGW64__)
inline int makeDir(const std::string& path, unsigned mode)
{
// #ifdef __sun
// mkdirp(path.c_str(), mode);
// #else
std::string::size_type i = 0;

while ((i = path.find('/',i+1)) != std::string::npos)
{
std::string thispath(path.substr(0,i));
if (thispath[thispath.length() - 1] == '/')
thispath.erase(thispath.length() - 1);

mkdir(thispath.c_str());

}
mkdir(path.c_str());
// #endif
return 0;
}
#else
inline int makeDir(const std::string& path, unsigned mode)
{
// #ifdef __sun
Expand Down