Skip to content

Commit

Permalink
apacheGH-39385: [C++] Use more permissable return code for rename
Browse files Browse the repository at this point in the history
  • Loading branch information
anjakefala committed Jan 8, 2024
1 parent 01deb94 commit 2882390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/arrow/filesystem/localfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ Status LocalFileSystem::Move(const std::string& src, const std::string& dest) {
"' to '", dfn.ToString(), "'");
}
#else
if (rename(sfn.ToNative().c_str(), dfn.ToNative().c_str()) == -1) {
if (rename(sfn.ToNative().c_str(), dfn.ToNative().c_str()) != 0) {
return IOErrorFromErrno(errno, "Failed renaming '", sfn.ToString(), "' to '",
dfn.ToString(), "'");
}
Expand Down

0 comments on commit 2882390

Please sign in to comment.