mirror of https://github.com/facebook/rocksdb.git
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
This commit is contained in:
parent
c94523ee56
commit
2353c5c821
|
@ -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…
Reference in New Issue