You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/10/05 20:02:11 UTC

[GitHub] [incubator-seatunnel] ashulin commented on a diff in pull request #2980: [Bug][Connector-V2] Fix the bug of incorrect path in windows environment

ashulin commented on code in PR #2980:
URL: https://github.com/apache/incubator-seatunnel/pull/2980#discussion_r985625225


##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/writer/AbstractWriteStrategy.java:
##########
@@ -237,7 +236,7 @@ public void beginTransaction(Long checkpointId) {
      */
     public List<String> getTransactionIdFromStates(List<FileSinkState> fileStates) {
         String[] pathSegments = new String[]{textFileSinkConfig.getPath(), Constant.SEATUNNEL, jobId};
-        String jobDir = String.join(File.separator, pathSegments) + "/";
+        String jobDir = String.join("/", pathSegments) + "/";

Review Comment:
   `File.separator` is supported for window, whether it is the problem of the following "/";



##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/writer/AbstractWriteStrategy.java:
##########
@@ -237,7 +236,7 @@ public void beginTransaction(Long checkpointId) {
      */
     public List<String> getTransactionIdFromStates(List<FileSinkState> fileStates) {
         String[] pathSegments = new String[]{textFileSinkConfig.getPath(), Constant.SEATUNNEL, jobId};
-        String jobDir = String.join(File.separator, pathSegments) + "/";
+        String jobDir = String.join("/", pathSegments) + "/";

Review Comment:
   `File.separator` is supported for window, whether it is the problem of the following "/"?



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org