https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43078

--- Comment #6 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 202205
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202205&action=edit
Bug 43078: Exclude '.' and '..' entries from SFTP file listings

The FTP and Local transports both explicitly filter out '.' and '..'
pseudo-entries when listing a directory, but the SFTP transport never
did - it relied on the assumption that Net::SFTP::Foreign's ls() already
excludes them. It doesn't: ls() returns exactly whatever entries the
remote server includes in its SSH_FXP_READDIR response, with no default
filtering. Whether '.'/'..' show up therefore depends entirely on the
remote SFTP server implementation, producing inconsistent results between
otherwise identically configured SFTP accounts.

Test plan:
1. prove t/db_dependent/Koha/File/Transport/SFTP.t
   => fails before this patch (listing includes '.' and '..')
   => passes after this patch
2. prove -r t/db_dependent/Koha/File/Transport/
t/db_dependent/Koha/File/Transports.t
   => all still pass

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to