Skip to content

Commit

Permalink
fix: normalize win32 paths before globbing
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Apr 21, 2022
1 parent 18666fc commit 4bdd5d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/verify.js
Expand Up @@ -13,6 +13,8 @@ const path = require('path')
const rimraf = util.promisify(require('rimraf'))
const ssri = require('ssri')

const globify = pattern => pattern.split('\\').join('/')

const hasOwnProperty = (obj, key) =>
Object.prototype.hasOwnProperty.call(obj, key)

Expand Down Expand Up @@ -119,7 +121,7 @@ function garbageCollect (cache, opts) {
indexStream.on('end', resolve).on('error', reject)
}).then(() => {
const contentDir = contentPath.contentDir(cache)
return glob(path.join(contentDir, '**'), {
return glob(globify(path.join(contentDir, '**')), {
follow: false,
nodir: true,
nosort: true,
Expand Down

0 comments on commit 4bdd5d5

Please sign in to comment.