Skip to content

Commit

Permalink
Load: Fix the source parameter of the load tsfile script cannot speci…
Browse files Browse the repository at this point in the history
…fy a file (#13619)

(cherry picked from commit 59475a6)
  • Loading branch information
YC27 authored Sep 25, 2024
1 parent 8e77c20 commit b9f17a2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ public static void setSourceFullPath(final String sourceFullPath) {
}

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() {
Expand Down

0 comments on commit b9f17a2

Please sign in to comment.