Fix SFTP compatibility with FileZilla#28
Conversation
- Implement `scandir` instead of `listdir` to provide file attributes (mode, mtime). - Provide explicit `S_IFDIR` for directories and `S_IFREG` for files. - Include `.` and `..` entries in directory listings. - Improve error handling for non-existent clients and paths in SFTP. - Fix path resolution to correctly identify client root directories. Co-authored-by: VulcanoSoftware <113239901+VulcanoSoftware@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This change fixes the "Not a directory" error when connecting to the SFTP server using FileZilla. The issue was caused by the SFTP handler not providing enough metadata about the virtual filesystem entries. By implementing
scandirand providing explicitSFTPAttrs, clients can now correctly distinguish between files and directories. Additionally, I've improved path handling to ensure that client roots and non-existent paths are handled gracefully.PR created automatically by Jules for task 10571038290164382082 started by @VulcanoSoftware