isaacs/npm — pull request #2592 by mintplant (2012-07-02 06:14:16+00:00)
Title: Fix ENAMETOOLONG errors on cache lock files.

Old cache lock format:

{cache}/{sha(url)}-{url.replace(/[^a-zA-Z0-9]+/g, '-')}.lock

New cache lock format, which actually matches up with the comments
in lib/cache.js:

{cache}/{sha(url)}.lock

In relatively frequent instances (see #2590), encoding the full path in the lock file name raises ENAMETOOLONG errors.

Reproducible by cloning npm and running `npm test`, on the following system, at least:

LSB Version:	core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 12.04 LTS
Release:	12.04
Codename:	precise

Bug introduced in 59554aa9c5.