Hi Greg, here is my patch, can you test it on your side?
This is a cleanup of |get_current_directory| and CHDIR:
1. Use Lisp native functions when possible.
2. Move implementation together, after FFI functions and
at the beginning filesystem functions.
3. For CHDIR, return t if success, otherwise silence the
error and return nil.
4. I've not done it, but I'd like to take this opportunity
to change the API of |get_current_directory| a bit:
it is better to return a path string that ends in "/". Opinions?
5. Tested for various Lisps in CI, no breakage found.
- Qian