tustvold commented on code in PR #5528:
URL: https://github.com/apache/arrow-rs/pull/5528#discussion_r1529021884


##########
object_store/src/local.rs:
##########
@@ -600,6 +600,14 @@ impl ObjectStore for LocalFileSystem {
 
     async fn copy(&self, from: &Path, to: &Path) -> Result<()> {
         let from = self.path_to_filesystem(from)?;
+        if !from.exists() {
+            return Err(Error::NotFound {

Review Comment:
   This suffers from a TOCTOU race condition, I think we need to instead detect 
and handle the case of parent directories already existing when we go to create 
them



-- 
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]

Reply via email to