[ 
https://issues.apache.org/jira/browse/DRILL-4416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16887349#comment-16887349
 ] 

ASF GitHub Bot commented on DRILL-4416:
---------------------------------------

vvysotskyi commented on pull request #385: DRILL-4416: quote path separator for 
cross platform compatibility
URL: https://github.com/apache/drill/pull/385#discussion_r304594338
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
 ##########
 @@ -194,7 +193,7 @@ private static String commonPathForFiles(final 
List<String> files) {
     int shortest = Integer.MAX_VALUE;
     for (int i = 0; i < total; i++) {
       final Path path = new Path(files.get(i));
-      folders[i] = 
Path.getPathWithoutSchemeAndAuthority(path).toString().split(PATH_SEPARATOR);
+      folders[i] = 
Path.getPathWithoutSchemeAndAuthority(path).toString().split(FileUtils.PATH_SEPARATOR_QUOTED);
 
 Review comment:
   I don't think that `PATH_SEPARATOR_QUOTED` should be used there since 
`org.apache.hadoop.fs.Path` was used which should use `/` separator 
independently on the system.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Quote path separator for windows
> --------------------------------
>
>                 Key: DRILL-4416
>                 URL: https://issues.apache.org/jira/browse/DRILL-4416
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Hanifi Gunes
>            Assignee: Hanifi Gunes
>            Priority: Major
>             Fix For: Future
>
>
> Windows uses backslash as its path separator. We need to do string 
> manipulation using the separator during which the separator must be quoted. 
> This issue proposes (i) creating a global static path separator variable in 
> common and (ii) removing all others and (iii) using quoted separator where 
> need be.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to