tustvold commented on code in PR #4231:
URL: https://github.com/apache/arrow-rs/pull/4231#discussion_r1195627652
##########
object_store/src/local.rs:
##########
@@ -878,19 +883,25 @@ fn read_range(file: &mut File, path: &PathBuf, range:
Range<usize>) -> Result<By
}
fn open_file(path: &PathBuf) -> Result<File> {
- let file = File::open(path).map_err(|e| {
- if e.kind() == std::io::ErrorKind::NotFound {
- Error::NotFound {
+ let file = match File::open(path).and_then(|f| Ok((f.metadata()?, f))) {
Review Comment:
This is potentially slightly unfortunate, in that we require an additional
syscall, but I couldn't find a mechanism to only open files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]