https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43092
Bug ID: 43092
Summary: Koha::File::Transport::change_directory(undef) means
three different things across FTP, SFTP and 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's three backends disagree on what change_directory(undef)
means:
- FTP: Net::FTP's cwd(undef) defaults to "/" and navigates to the server root.
- SFTP: Net::SFTP::Foreign's setcwd(undef) clears client-side tracking,
falling back to the SFTP session's own home/default directory.
- Local: clears the tracked override, falling back to the configured
download_directory, or "." (the Koha process's own working directory) if
neither is set.
The base class's own test_connection() calls change_directory(undef)
unconditionally on every config save (via the auto-enqueued TestTransport
background job), for both the download and upload directory checks. For a
Local transport configured with only one of download_directory/
upload_directory, the untested direction's change_directory(undef) +
list_files() call silently lists the Koha process's own working directory
(e.g. the Koha install root) instead of failing cleanly or being skipped -
not what any of the three backends' behaviour suggests was intended.
Test plan:
1. prove t/db_dependent/Koha/File/Transport/Local.t
2. koha-qa.pl -v 2 --more-tests
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 watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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/