Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit ce5896b36d3129815c7bbbdb1abf5a495b185eac 1 parent be298fc
Michael Smith authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/cache.js
5 lib/cache.js
View
@@ -949,9 +949,8 @@ function deprCheck (data) {
}
function lockFileName (u) {
- var c = u.replace(/[^a-zA-Z0-9]+/g, '-')
- , h = crypto.createHash("sha1").update(u).digest("hex")
- return path.resolve(npm.config.get("cache"), h + "-" + c + ".lock")
+ var h = crypto.createHash("sha1").update(u).digest("hex")
+ return path.resolve(npm.config.get("cache"), h + ".lock")
}
var madeCache = false
Please sign in to comment.
Something went wrong with that request. Please try again.