Skip to content

Commit

Permalink
Fix cross-filesystem checkpoint on Windows (#4365)
Browse files Browse the repository at this point in the history
Summary:
Now port/win_env.cc do check error for cross device link creation.
Fixes #4364
Pull Request resolved: #4365

Differential Revision: D9833144

Pulled By: ajkr

fbshipit-source-id: be7555e510f4b8d2196d843841606a6cfada7644
  • Loading branch information
Constantin Belyaev authored and facebook-github-bot committed Sep 14, 2018
1 parent c94523e commit 2353c5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions port/win/env_win.cc
Expand Up @@ -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);
Expand Down

0 comments on commit 2353c5c

Please sign in to comment.