[
https://issues.apache.org/jira/browse/FLINK-6987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16060862#comment-16060862
]
ASF GitHub Bot commented on FLINK-6987:
---------------------------------------
Github user zhangminglei commented on a diff in the pull request:
https://github.com/apache/flink/pull/4168#discussion_r123743180
--- Diff:
flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java ---
@@ -461,8 +463,9 @@ public LocatableInputSplitAssigner
getInputSplitAssigner(FileInputSplit[] splits
// take the desired number of splits into account
minNumSplits = Math.max(minNumSplits, this.numSplits);
-
- final Path path = this.filePath;
+
+ final Path path = new
Path(URLDecoder.decode(this.filePath.toString(),
Charset.defaultCharset().name()));
--- End diff --
We can also use ```parentDir.getAbsoluteFile().toString()``` to hack that.
Not very sure about which way is better. I would think
```parentDir.getAbsoluteFile().toString()``` is better as it can obtain the
whole path. What do you think ? @zentol
> TextInputFormatTest fails when run in path containing spaces
> ------------------------------------------------------------
>
> Key: FLINK-6987
> URL: https://issues.apache.org/jira/browse/FLINK-6987
> Project: Flink
> Issue Type: Bug
> Components: Build System
> Affects Versions: 1.3.1
> Reporter: Timo Walther
> Assignee: mingleizhang
>
> The test {{TextInputFormatTest.testNestedFileRead}} fails if the path
> contains spaces.
> Reason: "Test erroneous"
> I was building Flink on MacOS 10.12.5 and the folder was called "flink-1.3.1
> 2".
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)