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

CommentFileSizeAuthor
imce.module.patch_0.txt457 bytesspiney@linux.spiney.org
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ufku’s picture

Status: Active » Fixed

fixed. not only '/' character but also '-' character is escaped now.
thanks.

spiney@linux.spiney.org’s picture

Thanks 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.

ufku’s picture

drupal 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.

spiney@linux.spiney.org’s picture

Ok, 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.

ufku’s picture

Status: Fixed » Closed (fixed)

;)