Question

I need to create a subdirectory in the private files folder. I can check if the folder is available with variable_get('file_private_path', FALSE) in hook_install or hook_enable.

But how can I prevent my module from getting enabled? And preferably, I want hook_uninstall to run in case this happens so that the user can first setup the private files directory and then try again.

I played with module_disable and drupal_uninstall_modules, but (understandably) those don't seem to work if they target the module they are called from. I'm using Drupal 7.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top