The FeedsFileFetcher class implements a method, listFiles to list all the files to fetch. However, this method does not take into consideration the allowed extensions set in the Fetcher configuration. This leads to attempts to import the wrongs files.
Attached is a patch that makes two major changes. One is to ensure that only files with the correction extension are fetched. This is done by a means of the second major change, which is to swap out normal PHP file scanning techniques with Drupal techniques instead. In this instance, this means using file_scan_directory which also reduces code. Refactor++.
Comment | File | Size | Author |
---|---|---|---|
feeds-7.x-FeedsFileFetcher.patch | 1018 bytes | Josh Waihi | |
Comments
Comment #1
twistor CreditAttribution: twistor commentedThis looks good.
Comment #3
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedTested manually. Works fine. Committed.
Comment #5
qproAfter experimenting this issue https://www.drupal.org/node/2116467 and to realize that the problem was that "Allowed file extensions" (in "File upload Settings") is case sensitive, I think that the "case-sensitivism" should be the same in all upload modules.
I don't realize about the problem before perhaps due to I was using media module in the same site to upload same files and I was not experiencing any problem (media module is case insensitive)