Thanks, Dave.
I wasn't clear enough in my initial message. I actually was planning on putting the "if dotlrn is installed" bit around the existing code, but I still need somewhere to put the files in the non-dotlrn case. That was what I was asking about.
My particular installation, being fairly stock, has only one file-storage instance. But there could be many of them. Do we want to require the person setting this up to mount a file-storage instance under forums, along with the attachments instance, just for use by attachments? In looking at what the code was before I changed it I think this is what it was doing; it starts from its parent's package_id and looks for a file-storage instance there.