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

rong pushed a commit to branch rc/1.3.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rc/1.3.3 by this push:
     new b9f17a251b4 Load: Fix the source parameter of the load tsfile script 
cannot specify a file (#13619)
b9f17a251b4 is described below

commit b9f17a251b47d9fa4047b78a9e2a7b1ec4d95ebf
Author: YC27 <[email protected]>
AuthorDate: Wed Sep 25 16:50:12 2024 +0800

    Load: Fix the source parameter of the load tsfile script cannot specify a 
file (#13619)
    
    (cherry picked from commit 59475a6a6031c07e74bf5ab25f991e4077dbf450)
---
 .../main/java/org/apache/iotdb/tool/tsfile/ImportTsFileScanTool.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/tsfile/ImportTsFileScanTool.java
 
b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/tsfile/ImportTsFileScanTool.java
index 4ec9f229084..4891f425486 100644
--- 
a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/tsfile/ImportTsFileScanTool.java
+++ 
b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/tsfile/ImportTsFileScanTool.java
@@ -86,7 +86,9 @@ public class ImportTsFileScanTool {
   }
 
   public static int getSourceFullPathLength() {
-    return ImportTsFileScanTool.sourceFullPath.length();
+    return new File(sourceFullPath).isDirectory()
+        ? ImportTsFileScanTool.sourceFullPath.length()
+        : new File(ImportTsFileScanTool.sourceFullPath).getParent().length();
   }
 
   public static int getTsFileQueueSize() {

Reply via email to