You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2024/06/30 05:04:11 UTC

(paimon) branch master updated: [core] LocalFileIO copyFile should mkdirs for target path

This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 26b3b2c94 [core] LocalFileIO copyFile should mkdirs for target path
26b3b2c94 is described below

commit 26b3b2c947a6e0576dce11bf412f2ede2af15fee
Author: Jingsong <ji...@gmail.com>
AuthorDate: Sun Jun 30 13:03:55 2024 +0800

    [core] LocalFileIO copyFile should mkdirs for target path
---
 paimon-common/src/main/java/org/apache/paimon/fs/local/LocalFileIO.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/paimon-common/src/main/java/org/apache/paimon/fs/local/LocalFileIO.java b/paimon-common/src/main/java/org/apache/paimon/fs/local/LocalFileIO.java
index 6e1e27fa4..ac84c242c 100644
--- a/paimon-common/src/main/java/org/apache/paimon/fs/local/LocalFileIO.java
+++ b/paimon-common/src/main/java/org/apache/paimon/fs/local/LocalFileIO.java
@@ -222,6 +222,7 @@ public class LocalFileIO implements FileIO {
         if (!overwrite && exists(targetPath)) {
             return;
         }
+        toPath(targetPath.getParent()).toFile().mkdirs();
         Files.copy(toPath(sourcePath), toPath(targetPath), StandardCopyOption.REPLACE_EXISTING);
     }