The GitHub Actions job "Java CI" on 
commons-vfs.git/VFS-root-exists-on-disconnect has succeeded.
Run started by GitHub user ilang (triggered by garydgregory).

Head commit for run:
18bf29ea6feb5c79e7d451df5fca033857a80bad / Ilan Goldfeld 
<[email protected]>
[VFS] Fix FtpFileObject.exists() returning true for root-level folders after 
connection drop

setFTPFile() blindly assumed that root-level directories (where
getParent() returns null) always exist by creating a synthetic FTPFile
with DIRECTORY_TYPE. This caused exists() to return true even after the
FTP connection was lost.

Fix: add verifyRootDirectory() which uses CWD "." to verify the
directory exists on the server. CWD "." checks the current directory
(the logical VFS root) which is correct for both configurations:
- userDirIsRoot=true: current dir is the user's login directory
- userDirIsRoot=false: current dir is "/" (set by the factory CWD)

Using "." rather than "/" avoids a semantic mismatch on non-chroot
servers with userDirIsRoot=true, where "/" would go to the actual
server root instead of the user's login directory.

Add FtpClient.changeDirectory() default method and FTPClientWrapper
implementation to support CWD from FtpFileObject.

Report URL: https://github.com/apache/commons-vfs/actions/runs/23835421714

With regards,
GitHub Actions via GitBox

Reply via email to