{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/28141021","id":28141021,"diff_hunk":"@@ -1659,9 +1659,14 @@ private[spark] object Utils extends Logging {\n   val windowsDrive = \"([a-zA-Z])\".r\n \n   /**\n-   * Format a Windows path such that it can be safely passed to a URI.\n+   * Format a path such that it can be safely passed to a URI.\n    */\n-  def formatWindowsPath(path: String): String = path.replace(\"\\\\\", \"/\")\n+  def formatPath(path: String, windows: Boolean): String = {\n+    val formatted = path.replace(\" \", \"%20\")","path":"core/src/main/scala/org/apache/spark/util/Utils.scala","position":9,"original_position":9,"commit_id":"2c62e3be2682525e96bab18bac180fc2545323c7","original_commit_id":"2c62e3be2682525e96bab18bac180fc2545323c7","user":{"login":"srowen","id":822522,"avatar_url":"https://avatars.githubusercontent.com/u/822522?v=3","gravatar_id":"","url":"https://api.github.com/users/srowen","html_url":"https://github.com/srowen","followers_url":"https://api.github.com/users/srowen/followers","following_url":"https://api.github.com/users/srowen/following{/other_user}","gists_url":"https://api.github.com/users/srowen/gists{/gist_id}","starred_url":"https://api.github.com/users/srowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srowen/subscriptions","organizations_url":"https://api.github.com/users/srowen/orgs","repos_url":"https://api.github.com/users/srowen/repos","events_url":"https://api.github.com/users/srowen/events{/privacy}","received_events_url":"https://api.github.com/users/srowen/received_events","type":"User","site_admin":false},"body":"I think this is OK for now and solves the immediate problem. I wonder if we will need to do more complete URI escaping later -- although, it's not clear what URI scheme we assume anyway. LGTM.","created_at":"2015-04-10T12:42:35Z","updated_at":"2015-04-10T12:42:35Z","html_url":"https://github.com/apache/spark/pull/5447#discussion_r28141021","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/5447","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/28141021"},"html":{"href":"https://github.com/apache/spark/pull/5447#discussion_r28141021"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/5447"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/5447","id":33020511,"html_url":"https://github.com/apache/spark/pull/5447","diff_url":"https://github.com/apache/spark/pull/5447.diff","patch_url":"https://github.com/apache/spark/pull/5447.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/5447","number":5447,"state":"open","locked":false,"title":"[SPARK-6568] spark-shell.cmd --jars option does not accept the jar that has space in its path","user":{"login":"tsudukim","id":8070366,"avatar_url":"https://avatars.githubusercontent.com/u/8070366?v=3","gravatar_id":"","url":"https://api.github.com/users/tsudukim","html_url":"https://github.com/tsudukim","followers_url":"https://api.github.com/users/tsudukim/followers","following_url":"https://api.github.com/users/tsudukim/following{/other_user}","gists_url":"https://api.github.com/users/tsudukim/gists{/gist_id}","starred_url":"https://api.github.com/users/tsudukim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsudukim/subscriptions","organizations_url":"https://api.github.com/users/tsudukim/orgs","repos_url":"https://api.github.com/users/tsudukim/repos","events_url":"https://api.github.com/users/tsudukim/events{/privacy}","received_events_url":"https://api.github.com/users/tsudukim/received_events","type":"User","site_admin":false},"body":"escape spaces in the arguments.","created_at":"2015-04-10T06:12:19Z","updated_at":"2015-04-10T12:42:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a5db2d3055bd2078ac05e92c77f1dc5b091fe1f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/5447/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/5447/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/5447/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/2c62e3be2682525e96bab18bac180fc2545323c7","head":{"label":"tsudukim:feature/SPARK-6568-2","ref":"feature/SPARK-6568-2","sha":"2c62e3be2682525e96bab18bac180fc2545323c7","user":{"login":"tsudukim","id":8070366,"avatar_url":"https://avatars.githubusercontent.com/u/8070366?v=3","gravatar_id":"","url":"https://api.github.com/users/tsudukim","html_url":"https://github.com/tsudukim","followers_url":"https://api.github.com/users/tsudukim/followers","following_url":"https://api.github.com/users/tsudukim/following{/other_user}","gists_url":"https://api.github.com/users/tsudukim/gists{/gist_id}","starred_url":"https://api.github.com/users/tsudukim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsudukim/subscriptions","organizations_url":"https://api.github.com/users/tsudukim/orgs","repos_url":"https://api.github.com/users/tsudukim/repos","events_url":"https://api.github.com/users/tsudukim/events{/privacy}","received_events_url":"https://api.github.com/users/tsudukim/received_events","type":"User","site_admin":false},"repo":{"id":21508640,"name":"spark","full_name":"tsudukim/spark","owner":{"login":"tsudukim","id":8070366,"avatar_url":"https://avatars.githubusercontent.com/u/8070366?v=3","gravatar_id":"","url":"https://api.github.com/users/tsudukim","html_url":"https://github.com/tsudukim","followers_url":"https://api.github.com/users/tsudukim/followers","following_url":"https://api.github.com/users/tsudukim/following{/other_user}","gists_url":"https://api.github.com/users/tsudukim/gists{/gist_id}","starred_url":"https://api.github.com/users/tsudukim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsudukim/subscriptions","organizations_url":"https://api.github.com/users/tsudukim/orgs","repos_url":"https://api.github.com/users/tsudukim/repos","events_url":"https://api.github.com/users/tsudukim/events{/privacy}","received_events_url":"https://api.github.com/users/tsudukim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tsudukim/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/tsudukim/spark","forks_url":"https://api.github.com/repos/tsudukim/spark/forks","keys_url":"https://api.github.com/repos/tsudukim/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tsudukim/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tsudukim/spark/teams","hooks_url":"https://api.github.com/repos/tsudukim/spark/hooks","issue_events_url":"https://api.github.com/repos/tsudukim/spark/issues/events{/number}","events_url":"https://api.github.com/repos/tsudukim/spark/events","assignees_url":"https://api.github.com/repos/tsudukim/spark/assignees{/user}","branches_url":"https://api.github.com/repos/tsudukim/spark/branches{/branch}","tags_url":"https://api.github.com/repos/tsudukim/spark/tags","blobs_url":"https://api.github.com/repos/tsudukim/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tsudukim/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tsudukim/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/tsudukim/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tsudukim/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/tsudukim/spark/languages","stargazers_url":"https://api.github.com/repos/tsudukim/spark/stargazers","contributors_url":"https://api.github.com/repos/tsudukim/spark/contributors","subscribers_url":"https://api.github.com/repos/tsudukim/spark/subscribers","subscription_url":"https://api.github.com/repos/tsudukim/spark/subscription","commits_url":"https://api.github.com/repos/tsudukim/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/tsudukim/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/tsudukim/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/tsudukim/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/tsudukim/spark/contents/{+path}","compare_url":"https://api.github.com/repos/tsudukim/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tsudukim/spark/merges","archive_url":"https://api.github.com/repos/tsudukim/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tsudukim/spark/downloads","issues_url":"https://api.github.com/repos/tsudukim/spark/issues{/number}","pulls_url":"https://api.github.com/repos/tsudukim/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/tsudukim/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/tsudukim/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tsudukim/spark/labels{/name}","releases_url":"https://api.github.com/repos/tsudukim/spark/releases{/id}","created_at":"2014-07-04T22:08:58Z","updated_at":"2015-04-09T05:14:31Z","pushed_at":"2015-04-10T05:45:42Z","git_url":"git://github.com/tsudukim/spark.git","ssh_url":"git@github.com:tsudukim/spark.git","clone_url":"https://github.com/tsudukim/spark.git","svn_url":"https://github.com/tsudukim/spark","homepage":null,"size":98843,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"e2360810f50de77f79d372cc9b46db117d451cfc","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-04-10T12:34:50Z","pushed_at":"2015-04-10T12:25:07Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":1493250,"stargazers_count":3554,"watchers_count":3554,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3074,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":331,"forks":3074,"open_issues":331,"watchers":3554,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/5447"},"html":{"href":"https://github.com/apache/spark/pull/5447"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/5447"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/5447/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/5447/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/5447/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/2c62e3be2682525e96bab18bac180fc2545323c7"}}}}