Closed thekeith closed 1 year ago
What should be the expected behaviour? How did you configure the default directory on your server?
This is indeed a bug. Code App is ignoring the remote working directory.
https://github.com/thebaselab/codeapp/blob/b5508054a8f2b70a93997bbc6a3afc71b7c39fb9/CodeApp/Managers/FileSystem/SFTP/SFTPFileSystemProvider.swift#L104-L105
Fix: In SFTPFileSystemProvider.swift
, we should call libssh2'slibssh2_sftp_realpath
with .
as the argument to obtain the working directory and assign it to self.homePath
.
The changes I made in NMSSH: https://github.com/thebaselab/NMSSH/commit/2d800fca5d2da49baff1cbc061b275e33df70731
This should work universally on different platforms as it is how the FreeBSD sftp command pwd
works:
https://github.com/freebsd/freebsd-src/blob/6b635c74fd4135eaae68970bfc5aad9ae905fec7/crypto/openssh/sftp.c#L2237
Did the changes make it to 1.4.7 or is it still to be released?
Did the changes make it to 1.4.7 or is it still to be released?
It should be available on TestFlight later today.
Resolved in latest build. Thanks!
Because of #943, resolving home path is now an configurable option and is off by default.
Whenever an SSH connection is opened it defaults the file browser to the root directory of the filesystem for some reason. Any attempt to change this on the server side is ineffective.