Summary: | SMBSlave::listDir() should use smbc_readdirplus() if available | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio-extras | Reporter: | Andreas Schneider <asn> |
Component: | Samba | Assignee: | Harald Sitter <sitter> |
Status: | RESOLVED FIXED | ||
Severity: | task | CC: | asn, mikhailnov, nate, sitter |
Priority: | NOR | ||
Version: | 18.12.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kio-extras/ec40cd6ef3f497637f4e7e31e3dc60c221e25f5c | Version Fixed In: | 20.04.0 |
Description
Andreas Schneider
2019-01-08 05:55:02 UTC
We need to implement smbc_readdirplus2() as we fscked up the API :-( That only applies to directory listing, right? To list shares and printers and whatnot we'd still need the smbc_dirents from smbc_readdir. Also this documentation seems a bit lackluster ``` /** * DOS attributes of file */ uint16_t attrs; ``` are they mode bits like SMBC_DOS_MODE_HIDDEN? Yes, this is only for listing directory contents. In the meantime we have smbc_readdirplus2() which addresses some bugs created with smbc_readdirplus(). Git commit ec40cd6ef3f497637f4e7e31e3dc60c221e25f5c by Harald Sitter. Committed on 16/03/2020 at 12:25. Pushed by sitter into branch 'master'. add readdirplus2 support for samba>=4.12 Summary: unlike the dirent itering we do not need a separate stat call with this new api by instead itering on what are effectively stat-like objects. this simply runs before the regular itering which we still use to list shares and workgroups. browse_stat_path has been split into stat and udsentry-construction-from-stat so it can be used across both code paths. fun fact on the side: if there actually was a stat() api that returned libsmb_file_info, we could use that as well and forget about the stats structs in general :S FIXED-IN: 20.04.0 Test Plan: - build samba 4.12 rc - list server - list share - list dir in share - on 4.7 - all of the above Reviewers: ngraham, asn Reviewed By: ngraham Subscribers: kde-frameworks-devel, kfm-devel Tags: #dolphin, #frameworks Differential Revision: https://phabricator.kde.org/D27520 # Conflicts: # smb/CMakeLists.txt # smb/kio_smb.h # smb/kio_smb_browse.cpp M +7 -0 smb/CMakeLists.txt M +1 -0 smb/config-smb.h.cmake M +1 -1 smb/kio_smb.h M +82 -53 smb/kio_smb_browse.cpp https://commits.kde.org/kio-extras/ec40cd6ef3f497637f4e7e31e3dc60c221e25f5c |