Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14960#discussion_r77531923
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -1900,7 +1900,20 @@ private[spark] object Utils extends Logging {
        */
       def resolveURI(path: String): URI = {
         try {
    -      val uri = new URI(path)
    +      val osSafePath = if (Path.isWindowsAbsolutePath(path, false)) {
    +        // Make sure C:/ part becomes /C/.
    +        val windowsUri = new URI(path)
    +        val driveLetter = windowsUri.getScheme
    +        s"/$driveLetter/${windowsUri.getSchemeSpecificPart()}"
    +      } else if (Path.isWindowsAbsolutePath(path, true)) {
    +        // Make sure /C:/ part becomes /C/.
    +        val windowsUri = new URI(path.substring(1))
    +        val driveLetter = windowsUri.getScheme
    +        s"/$driveLetter/${windowsUri.getSchemeSpecificPart()}"
    --- End diff --
    
    Ah, If I remember this correctly `C:/../..` works in Windows with R.  Is 
this true or am i just imagining - cc @shivaram ?
    
    So, R pass the paths as they as (e.g. `C:/.../..`) and it recognizes pathes 
as below:
    
    <img width="387" alt="2016-09-05 11 45 07" 
src="https://cloud.githubusercontent.com/assets/6477701/18251218/d1db8b8a-73c2-11e6-8930-d6d9831c34b4.png";>
    
    and then produces some error cases?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to