fstream icon indicating copy to clipboard operation
fstream copied to clipboard

fstream kinda goes nuts with the directory creation

Open othiym23 opened this issue 11 years ago • 0 comments

Using some clever instrumentation, I have traced all the calls to mkdirp for the root directory for a module being written by fstream. My gut tells me that it's doing this once for the root directory plus once per file in the source tarball, but that's just intuition. In any case, that directory will be so created by the end of the process.

> /private/var/folders/bf/1f70gl7x2_g0s1dchcrw97xm0000gn/T/node_modules/underscore
1. creating /private/var/folders/bf/1f70gl7x2_g0s1dchcrw97xm0000gn/T/node_modules/underscore
    at DirWriter._create (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/dir-writer.js:35:3)
    at /Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:175:15
    at /Users/ogd/Documents/projects/npm/npm/node_modules/mkdirp/index.js:29:20
    at Object.oncomplete (fs.js:107:15)
2. creating /private/var/folders/bf/1f70gl7x2_g0s1dchcrw97xm0000gn/T/node_modules/underscore
    at create (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:169:3)
    at statCb (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:142:14)
    at Object.oncomplete (evalmachine.<anonymous>:107:15)
3. creating /private/var/folders/bf/1f70gl7x2_g0s1dchcrw97xm0000gn/T/node_modules/underscore
    at create (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:169:3)
    at statCb (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:160:5)
    at Object.oncomplete (evalmachine.<anonymous>:107:15)
4. creating /private/var/folders/bf/1f70gl7x2_g0s1dchcrw97xm0000gn/T/node_modules/underscore
    at create (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:169:3)
    at statCb (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:142:14)
    at Object.oncomplete (evalmachine.<anonymous>:107:15)
5. creating /private/var/folders/bf/1f70gl7x2_g0s1dchcrw97xm0000gn/T/node_modules/underscore
    at create (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:169:3)
    at statCb (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:142:14)
    at Object.oncomplete (evalmachine.<anonymous>:107:15)
6. creating /private/var/folders/bf/1f70gl7x2_g0s1dchcrw97xm0000gn/T/node_modules/underscore
    at create (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:169:3)
    at statCb (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:142:14)
    at Object.oncomplete (evalmachine.<anonymous>:107:15)
7. creating /private/var/folders/bf/1f70gl7x2_g0s1dchcrw97xm0000gn/T/node_modules/underscore
    at create (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:169:3)
    at statCb (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:142:14)
    at Object.oncomplete (evalmachine.<anonymous>:107:15)
8. creating /private/var/folders/bf/1f70gl7x2_g0s1dchcrw97xm0000gn/T/node_modules/underscore
    at create (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:169:3)
    at statCb (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:142:14)
    at Object.oncomplete (evalmachine.<anonymous>:107:15)
9. creating /private/var/folders/bf/1f70gl7x2_g0s1dchcrw97xm0000gn/T/node_modules/underscore
    at create (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:169:3)
    at statCb (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:142:14)
    at Object.oncomplete (evalmachine.<anonymous>:107:15)
10. creating /private/var/folders/bf/1f70gl7x2_g0s1dchcrw97xm0000gn/T/node_modules/underscore
    at create (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:169:3)
    at statCb (/Users/ogd/Documents/projects/npm/npm/node_modules/fstream/lib/writer.js:142:14)
    at Object.oncomplete (evalmachine.<anonymous>:107:15)

othiym23 avatar Aug 21 '14 22:08 othiym23