Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Actually, subdirectories do work already (as in, type "subdir/u" into the textfield and the files get places correctly), but then the imce.module raises an (luckily non-fatal) error in the drupal log:
preg_match(): Unknown modifier '[' in ..../imce/imce.module on line 349.
Interstingly enough this error gets raised when downloading files not uploaded through imce.module.
Anyway, attached is a patch that fixes the syntax error if there's a slash in imce_personal_prefix.
Kind regards
spiney
Comment | File | Size | Author |
---|---|---|---|
imce.module.patch_0.txt | 457 bytes | spiney@linux.spiney.org |
Comments
Comment #1
ufku CreditAttribution: ufku commentedfixed. not only '/' character but also '-' character is escaped now.
thanks.
Comment #2
spiney@linux.spiney.org CreditAttribution: spiney@linux.spiney.org commentedThanks for the quick fix. Forgot to mention it yesterday, but there's a small additional issue with subdirs, i.e. they don't get created on-the-fly, e.g. a prefix of "subdir/u" leads to an error message in the file-manager pop-up unless "subdir" itself gets created manually. "u" dirs get properly created as without subdir.
BTW, in case you don't catch this here (after all this issue has status "fixed"), I'll reopen this in another issue as minor feature request.
Comment #3
ufku CreditAttribution: ufku commenteddrupal itself doesnt allow creating sub directories of non-existent directories. in admin/settings you cant specify "files/subdir" as file system path without first specifiying "files". it is the admins job to create container directories first. and it is advised to create these by using drupal interface.
to create container directories for imce you may either change drupal's file system path temporarily in admin/settings or specify a shared folder temporarily in imce settings.
after your desired directory is created you can switch back to your previous settings.
note: imce shared folder is not created when you save settings. it is created when you run imce.
Comment #4
spiney@linux.spiney.org CreditAttribution: spiney@linux.spiney.org commentedOk, your explanation sounds reasonable, even though I'm not quite sure if agree completely. Maybe you could add a note to the README.txt, but personally it's not important to me because I can interpret the occuring error messages just fine. ;)
Anyway, I'm impressed with your overall response time, really great.
Comment #5
ufku CreditAttribution: ufku commented;)