-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[C++] Reviewing the rename call in LocalFileSystem::Move. #39385
Copy link
Copy link
Closed
Description
Describe the enhancement requested
LocalFileSystem::Move on non-Windows, calls rename: https://github.com/apache/arrow/blob/main/cpp/src/arrow/filesystem/localfs.cc#L585. It then does a check for -1, and prints the error.
While the rename system call and Posix standard do specify that a return value of -1 is expected for error calls, the C++ reference specifies that a "non-zero" is returned upon error.
I have two questions:
- Is the
renamethat is being called inLocalFileSystem::Movethe one instd::? Should it be prefaced withstd::? - Should the check be changed to a non-zero check, as opposed to a -1 check? Is there is a possibility that
std::renamereturns a different number other than -1 upon error?
Component(s)
C++
Reactions are currently unavailable