Fix cross-filesystem checkpoint on Windows (#4365)

Summary:
Now port/win_env.cc do check error for cross device link creation.
Fixes #4364
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4365

Differential Revision: D9833144

Pulled By: ajkr

fbshipit-source-id: be7555e510f4b8d2196d843841606a6cfada7644
main
Constantin Belyaev 6 years ago committed by Facebook Github Bot
parent c94523ee56
commit 2353c5c821
  1. 3
      port/win/env_win.cc

@ -706,6 +706,9 @@ Status WinEnvIO::LinkFile(const std::string& src,
if (!CreateHardLinkA(target.c_str(), src.c_str(), NULL)) {
DWORD lastError = GetLastError();
if (lastError == ERROR_NOT_SAME_DEVICE) {
return Status::NotSupported("No cross FS links allowed");
}
std::string text("Failed to link: ");
text.append(src).append(" to: ").append(target);

Loading…
Cancel
Save