Makes MockFileSystem::GetAbsolutePath work on Windows

oxigraph-main
Tpt 2 years ago committed by Niko PLP
parent 09882a52d6
commit f773c1d376
  1. 4
      env/mock_env.cc

4
env/mock_env.cc vendored

@ -601,11 +601,15 @@ IOStatus MockFileSystem::GetAbsolutePath(const std::string& db_path,
std::string* output_path, std::string* output_path,
IODebugContext* /*dbg*/) { IODebugContext* /*dbg*/) {
*output_path = NormalizeMockPath(db_path); *output_path = NormalizeMockPath(db_path);
#ifdef OS_WIN
return IOStatus::OK(); // TODO
#else
if (output_path->at(0) != '/') { if (output_path->at(0) != '/') {
return IOStatus::NotSupported("GetAbsolutePath"); return IOStatus::NotSupported("GetAbsolutePath");
} else { } else {
return IOStatus::OK(); return IOStatus::OK();
} }
#endif
} }
std::string MockFileSystem::NormalizeMockPath(const std::string& path) { std::string MockFileSystem::NormalizeMockPath(const std::string& path) {

Loading…
Cancel
Save