class-wp-filesystem-base::search_for_folder returns incorrect path
|Reported by:||cgastrell||Owned by:||dd32|
I got myself in an unusual situation, so this bug will oddly be duplicated. Worth a ticket though.
search_for_folder gets cut off in the wrong directory if a folder name is duplicated along the path.
- will work nice
- will fail
My situation is like this (in case i'm not being completely clear, pardon my english):
- live site path
- /var/www/domain/www : working site
- test site path
- /var/www/domain/test : working site installation duped and working
- path to ftp root
Every operation via ftp (automatic updates, plugin delete, theme install, plugin install) done on the test site falls on the directory of live site
When search_for_folder loops through the path parts (0=>var,1=>www,2=>domain,3=>www), as there are two path parts with the same name, it will be fouled into the first one. I don't know how else I could explain it, I'm not that good. Turning $this->verbose to true and adding print_r('key ' . $key .'<br />'); at the begining of the foreach allowed me to understand how this was happening (will attach). My wp is in spanish, so, in the image, when it says 'Cambiando' means 'Changing to' and 'Encontrado' means 'Found' (verbose messages).
Hope somebody pick this and come up with some fixing.
Change History (10)
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed