eca icon indicating copy to clipboard operation
eca copied to clipboard

[BUG] macOS paths with whitespace character are not being properly handled

Open erickisos opened this issue 10 months ago • 2 comments

Description

Today, while trying to work on some org-mode notes that I have on my iCloud drive I found myself unable to open the eca-chat. After checking the error buffer I saw this message:

[server] Starting server...
#error {
 :cause Illegal character in path at index 38: file:///Users/erickisos/Library/Mobile Documents/com~apple~CloudDocs/Notes/
 :via
 [{:type java.net.URISyntaxException
   :message Illegal character in path at index 38: file:///Users/erickisos/Library/Mobile Documents/com~apple~CloudDocs/Notes/
   :at [java.net.URI$Parser fail URI.java 2995]}]
 :trace
 [[java.net.URI$Parser fail URI.java 2995]
  [java.net.URI$Parser checkChars URI.java 3166]
  [java.net.URI$Parser parseHierarchical URI.java 3248]
  [java.net.URI$Parser parse URI.java 3196]
  [java.net.URI <init> URI.java 645]
  [eca.shared$uri__GT_filename invokeStatic shared.clj 30]
  [eca.shared$uri__GT_filename invoke shared.clj 30]

There are a few more lines, but if I'm understanding it correctly, the error is being triggered here in the uri->filename function.

In case you wanna add a test case the path is: file:///Users/erickisos/Library/Mobile Documents/com~apple~CloudDocs/Notes/

How to reproduce?

  1. Open a project stored in a directory with whitespace (if possible, the iCloud Drive was the one failing).
  2. Try to start eca from emacs with M-x eca.
  3. Check the logs (The chat will open but it won't be displaying anything except for the prompt section).

Doctor

I wasn't able to run the /doctor command since the server is unable to run.

Screenshots

Image

erickisos avatar Jan 17 '26 00:01 erickisos

@erickisos fixed! can you try 0.92.2 please?

ericdallo avatar Jan 17 '26 13:01 ericdallo

Thanks @ericdallo! It's working

erickisos avatar Jan 17 '26 16:01 erickisos