@@ -13,7 +13,7 @@ async function read (cache, integrity, opts = {}) {
13
13
const { size } = opts
14
14
const { stat, cpath, sri } = await withContentSri ( cache , integrity , async ( cpath , sri ) => {
15
15
// get size
16
- const stat = await fs . lstat ( cpath )
16
+ const stat = await fs . stat ( cpath )
17
17
return { stat, cpath, sri }
18
18
} )
19
19
if ( typeof size === 'number' && stat . size !== size ) {
@@ -73,8 +73,8 @@ function readStream (cache, integrity, opts = {}) {
73
73
// Set all this up to run on the stream and then just return the stream
74
74
Promise . resolve ( ) . then ( async ( ) => {
75
75
const { stat, cpath, sri } = await withContentSri ( cache , integrity , async ( cpath , sri ) => {
76
- // just lstat to ensure it exists
77
- const stat = await fs . lstat ( cpath )
76
+ // just stat to ensure it exists
77
+ const stat = await fs . stat ( cpath )
78
78
return { stat, cpath, sri }
79
79
} )
80
80
if ( typeof size === 'number' && size !== stat . size ) {
@@ -111,7 +111,7 @@ async function hasContent (cache, integrity) {
111
111
112
112
try {
113
113
return await withContentSri ( cache , integrity , async ( cpath , sri ) => {
114
- const stat = await fs . lstat ( cpath )
114
+ const stat = await fs . stat ( cpath )
115
115
return { size : stat . size , sri, stat }
116
116
} )
117
117
} catch ( err ) {
@@ -139,7 +139,7 @@ function hasContentSync (cache, integrity) {
139
139
140
140
return withContentSriSync ( cache , integrity , ( cpath , sri ) => {
141
141
try {
142
- const stat = fs . lstatSync ( cpath )
142
+ const stat = fs . statSync ( cpath )
143
143
return { size : stat . size , sri, stat }
144
144
} catch ( err ) {
145
145
if ( err . code === 'ENOENT' ) {
0 commit comments