We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffb0c0a commit 1c6633dCopy full SHA for 1c6633d
lib/fileinfo.js
@@ -1,4 +1,5 @@
1
var fs = require('fs'),
2
+ mkdirp = require('mkdirp'),
3
_ = require('lodash');
4
5
module.exports = function (options) {
@@ -36,7 +37,10 @@ module.exports = function (options) {
36
37
}
38
39
//Touch the file to be sure. Synchronous to have this done before the emit of 'begin' happens
- fs.closeSync(fs.openSync(options.baseDir() + '/' + this.name, 'w'));
40
+ mkdirp(options.baseDir(), function (err) {
41
+ if (err) {}
42
+ else {fs.closeSync(fs.openSync(options.baseDir() + '/' + this.name, 'w'));}
43
+ });
44
};
45
46
FileInfo.prototype.setUrl = function (type, baseUrl) {
0 commit comments