Skip to content

Commit

Permalink
Update fs-promises-utils.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlitdev committed May 29, 2021
1 parent 4599cb1 commit af9e0c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/fs-promises-utils.js
Expand Up @@ -30,7 +30,7 @@ const passThroughReadWithStat = (origReadFile, origStat, litroot, ghOpts, noPass
local: { stat: undefined, value: undefined },
remote: { stat: undefined, value: undefined },
}
const filePath = args[0] = path.join(litroot, args[0])
const filePath = args[0]
try {
try {
resp.local.stat = await origStat(...args)
Expand Down Expand Up @@ -58,7 +58,7 @@ const passThroughReadWithStat = (origReadFile, origStat, litroot, ghOpts, noPass
return resp
} else {
console.log('fs.passThroughReadWithStat passing through to fetch', filePath)
remoteResp = await fetch(filePath)
remoteResp = await fetch(path.join(litroot, args[0]))
}

if (!remoteResp || remoteResp.status < 200 || remoteResp.status >= 400) {
Expand Down Expand Up @@ -90,7 +90,7 @@ const writeFileP = (fs, litroot) => {
const wf = fs.writeFile
return async (...args) => {
console.log("fs.writeFileP ", args[0])
const filepath = (args[0] = litroot + args[0]);
const filepath = args[0];
const p = path.parse(filepath);
const parts = p.dir.split(path.sep);
// console.log(`"Parts for "${filepath}"`, parts);
Expand Down

0 comments on commit af9e0c4

Please sign in to comment.