fix: Error when using paths with non-ASCII characters for file watching on Unix/MacOS#1498
Conversation
942d2bf to
18c011d
Compare
18c011d to
8b09c15
Compare
|
The problem seems to be that the java.nio.Path implementation for Unix/MacOS expects the non-ASCII characters in the path of a file URI to be percent escaped, see JDK-8162518. For example the URI On the other hand, Windows does not seem to have a problem with non-ASCII characters in the URI: The problematic URI in question is created by us, when processing resource changes here, so we can actually influence its creation. My suggested fix is to do a round-trip: URI -> toASCIIString -> URI, which then leads to correct behavior, at least for my example above. TBH I don't think that this is an elegant fix, because the same problem may also occur in other locations. Sidenote for the interested reader (as I spent way too much time on this): The JDK seems quite inconsistent with conversion between URI or Paths/Files because
|
8b09c15 to
e64901a
Compare
|
e64901a to
095e661
Compare
095e661 to
104c9e8
Compare
|
This partially rolls back #1360, though the tests added there still pass. |
104c9e8 to
79f449f
Compare
79f449f to
d3f2eb6
Compare
Make sure that the URI that we pass to the FileSystemWatcherManager contain only ASCII characters
Fixes #1497