Opened 11 years ago
Last modified 6 years ago
#25741 new defect (bug)
Broken WP_Filesystem methods
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Filesystem API | Keywords: | needs-patch |
Focuses: | Cc: |
Description
The following methods of WP_Filesystem do not work as intended, as they're called with absolute paths, and fail to find those absolute paths within the relative paths returned from the listing functions:
- WP_Filesystem_FTPext
- owner()
- getchmod()
- group()
- WP_Filesystem_ftpsockets
- owner()
- getchmod()
- group()
It's worth noting that the following FTP methods are available but don't actually hit the filesystem, and are just there to match the WP_Filesystem_Direct
methods:
- is_readable()
- is_writable()
- atime()
- touch()
Attached is a patch I had locally from during 3.7 development, not thoughly tested, I believe WP_Filesystem_FTPext::owner() at least needs extra work.
The patch also removes the above methods from the FTP classes and relies upon the WP_Filesystem_Base
versions - as a result, the is_writable() and is_readable() methods changed to assume things are readable/writable.
See also this one, for two more broken methods (for different reasons), with patch: #26598