unfortunately, the new file API doesn't provide a way for outside modules to change the filepath prior to it saving a file, so in order to get issues into project issue's 'issues' directory, we have to catch the code right when it is actually inserting the comment or node, and move the file from files to files/issues, in both the file system and the {files} table.
after talking with one of the file API gurus, this seems like the only viable solution for 6.x, albeit a bit hackish. the attached patch has been running on d.o for a day now with no issues, so it's now been officially committed as the fix.
the only really wonky thing about this is that since the file gets saved then moved, the munging code gets run twice, and it can funkify the final filename a bit (ie, foo_0_0.patch) in certain circumstances.
| Comment | File | Size | Author |
|---|---|---|---|
| pi_rewrite_issue_filepath_hack.patch | 3.53 KB | hunmonk |
Comments