fix: make lstatReadlinkAbsolute work when readlink fails

This commit is contained in:
Ahmed Fasih 2024-08-15 22:09:02 -07:00
parent af8e8a8aba
commit 83c205745c
1 changed files with 1 additions and 1 deletions

View File

@ -625,7 +625,7 @@ const lstatReadlinkAbsolute = (fs, p, callback) => {
// we retry 2 times to catch this case before throwing the error
return doStat();
}
if (err || !target) return doStat();
if (err || !target) return callback(err || new Error("not found"));
const value = target.toString();
callback(null, join(fs, dirname(fs, p), value));
});