Skip to content

Commit c64368f

Browse files
committed
fix: change to decodeURIComponent
1 parent a973c8f commit c64368f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/setupContext.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const fs = require('fs')
2+
const url = require('url')
23
const os = require('os')
34
const path = require('path')
45
const crypto = require('crypto')
@@ -182,7 +183,8 @@ function trackModified(files) {
182183
let changed = false
183184

184185
for (let file of files) {
185-
let newModified = fs.statSync(file).mtimeMs
186+
let pathname = url.parse(file).pathname
187+
let newModified = fs.statSync(decodeURIComponent(pathname)).mtimeMs
186188

187189
if (!fileModifiedMap.has(file) || newModified > fileModifiedMap.get(file)) {
188190
changed = true

0 commit comments

Comments
 (0)