1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-06-20 01:17:49 +02:00
Files
David Steele 7da81569a0 Remove the unused sftpHandle field from the SFTP storage driver.
StorageSftp carried an sftpHandle field that production code never set. Directory listing opens a local handle, and each read/write object opens and owns its own handle in its open function, so this field was always NULL.

Despite that it was passed to storageReadSftpNew() and storageWriteSftpNew(), which immediately overwrite their own sftpHandle when the file is opened, and was "closed" in storageSftpLibSsh2SessionFreeResource(). Both paths were dead.

Remove the field, the constructor parameter (and its function log), and the close block in the free resource. Drop the unit tests that populated the field to exercise the removed close path, and extend the free-resource branch test so the sftp_shutdown EAGAIN retry loop stays covered.
2026-06-19 14:12:01 +07:00
..
2026-06-17 12:15:48 +07:00