| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0dd4639 commit f0c55e2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -140,8 +140,10 @@ function _rmchildren(path, options, callback) { | |||
| 140 | 140 | ||
| 141 | 141 | let done = false; | |
| 142 | 142 | ||
| 143 | - ArrayPrototypeForEach(files, (child) => { | ||
| 144 | - const childPath = Buffer.concat([pathBuf, separator, child]); | ||
| 143 | + const childPathPrefix = Buffer.concat([pathBuf, separator]); | ||
| 144 | + | ||
| 145 | + for (let i = 0; i < files.length; i++) { | ||
| 146 | + const childPath = Buffer.concat([childPathPrefix, files[i]]); | ||
| 145 | 147 | ||
| 146 | 148 | rimraf(childPath, options, (err) => { | |
| 147 | 149 | if (done) | |
@@ -156,7 +158,7 @@ function _rmchildren(path, options, callback) { | |||
| 156 | 158 | if (numFiles === 0) | |
| 157 | 159 | rmdir(path, callback); | |
| 158 | 160 | }); | |
| 159 | - }); | ||
| 161 | + } | ||
| 160 | 162 | }); | |
| 161 | 163 | } | |
| 162 | 164 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments