Line 92 of drush.inc

  if (is_dir($path . '/arc')) {
    drush_log('Modernizr already present. No download required.', 'ok');
  }

This is probably leftover from the code that was borrowed to create the function (from rdf module).

Comments

rupl’s picture

Status: Active » Fixed
StatusFileSize
new429 bytes

Removed the extraneous directory from $path. Committed to dev, but here's the patch:

jherencia’s picture

Status: Fixed » Needs review
StatusFileSize
new1.13 KB
new1.53 KB

Well, I've downloaded the latest dev version and nothing works here, it's always saying that the library exists because it checks if the folder exists after creating it.

Here is the patch that fixes this.

rupl’s picture

Status: Needs review » Fixed
StatusFileSize
new1.14 KB

Good catch, it seems I only tested the module enable process when I had an existing library.

The patch needed one small tweak, and I discovered this by executing the following drush commands. Scenario: using Libraries API and the library already exists. I re-enabled the module and there was a missing slash causing the library to be downloaded to a faulty location, when it should be doing nothing.

drush en libraries -y
drush en modernizr -y
    [lib was downloaded correctly]
drush dis modernizr -y
drush pm-uninstall modernizr -y
drush en modernizr -y
    [lib downloaded to a faulty location]

To fix this I added a slash in front of $libraries_path if Libraries API returns a valid location. I committed your patch with this one small change to fix the issue. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.