filter-scan-dir 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +3 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -118,7 +118,7 @@ function walkSync(path, options, level = 0) {
|
|
|
118
118
|
for (let ix = 0; !stop && ix < files.length; ix++) {
|
|
119
119
|
const file = files[ix];
|
|
120
120
|
const fullFile = options._path.join(dir, file);
|
|
121
|
-
const stat = Fs.
|
|
121
|
+
const stat = Fs.lstatSync(fullFile);
|
|
122
122
|
|
|
123
123
|
const extras = makeExtrasData(file, fullFile, path, stat, options);
|
|
124
124
|
|
|
@@ -152,7 +152,7 @@ function walkSync(path, options, level = 0) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
const asyncReaddir = Util.promisify(Fs.readdir);
|
|
155
|
-
const
|
|
155
|
+
const asyncLStat = Util.promisify(Fs.lstat);
|
|
156
156
|
|
|
157
157
|
async function walk(path, options, level = 0) {
|
|
158
158
|
try {
|
|
@@ -171,7 +171,7 @@ async function walk(path, options, level = 0) {
|
|
|
171
171
|
const file = files[ix];
|
|
172
172
|
const fullFile = options._path.join(dir, file);
|
|
173
173
|
|
|
174
|
-
const stat = await
|
|
174
|
+
const stat = await asyncLStat(fullFile);
|
|
175
175
|
const extras = makeExtrasData(file, fullFile, path, stat, options);
|
|
176
176
|
if (stat.isDirectory()) {
|
|
177
177
|
dirs.push(extras);
|