https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43087
Bug ID: 43087
Summary: Koha::File::Transport lacks a consistent
current_directory() accessor across FTP/SFTP/Local
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Depends on: 43078
Target Milestone: ---
Koha::File::Transport has no consistent, side-effect-free way to query a
transport's current remote working directory.
Bug 43078 unified list_files() across FTP/Local/SFTP, but left this gap:
Net::SFTP::Foreign's cwd() is a pure read-only accessor, but Net::FTP's own
cwd() is a mutator - called with no argument it defaults to "/" and issues a
real CWD command, changing the connection's directory as a side effect and
returning a boolean rather than a path.
This surfaced in the koha-plugin-transport-browser plugin, which read
$transport->{connection}->cwd directly to capture the initial working
directory for its root/breadcrumb navigation. That happened to work for
SFTP, but for FTP it silently reset the connection to the server's root
directory and captured "1" (a boolean) as the "path", breaking directory
navigation for FTP transports - clicking into a subdirectory just reloaded
the same listing instead of navigating in.
Depends on bug 43078.
Test plan:
1. Apply the attached patch on top of bug 43078.
2. prove t/db_dependent/Koha/File/Transport.t
t/db_dependent/Koha/File/Transport/FTP.t
t/db_dependent/Koha/File/Transport/Local.t
t/db_dependent/Koha/File/Transport/SFTP.t
3. koha-qa.pl -v 2 --more-tests reports [PASS] for all changed files with no
critic/pod warnings.
Referenced Bugs:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43078
[Bug 43078] File transport SFTP backend returns inconsistent list() structure
compared to FTP/Local backends
--
You are receiving this mail because:
You are the assignee for the bug.
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/