ParkGyeongTae commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3116689415

   @tbonelee 
   cc. @Reamer 
   Hi Chanho, Thanks a lot for checking this on Windows!
   
   It makes sense now that directly replacing `getURI()` with `getPath()` 
wouldn't work due to the mismatch between `rootNotebookFolder` and 
`noteFileName` on Windows. That’s a really helpful insight.
   
   Given that, what do you think about keeping `getURI()` but just applying 
decoding instead of replacing it with `getPath()`?
   
   Original code:
   ```java
   String noteFileName = fileObject.getName().getURI().replace("file:///", "/");
   ```
   Proposed changed:
   ```java
   String noteFileName = URLDecoder.decode(
       fileObject.getName().getURI(), StandardCharsets.UTF_8
   ).replace("file:///", "/");
   ```
   
   This might fix the encoded path issue without affecting the drive letter or 
breaking things on Windows. Would love to hear your thoughts!


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to