This commit is contained in:
Shane Harris
2020-08-17 13:31:48 +01:00
committed by Your Name
parent 1f3dad667b
commit 270d76ee39
2 changed files with 7 additions and 5 deletions
Binary file not shown.
+7 -5
View File
@@ -232,11 +232,13 @@ export class AppService {
sourcesPath = this.path.join(process.cwd(), 'build', 'platform-tools'); sourcesPath = this.path.join(process.cwd(), 'build', 'platform-tools');
} }
console.log(this.path.join(__dirname, '..', 'platform-tools'), process.cwd(), __dirname); console.log(this.path.join(__dirname, '..', 'platform-tools'), process.cwd(), __dirname);
this.fs.readdir(sourcesPath, (err, files) => { this.fs.mkdir(this.path.join(this.appData, 'platform-tools'), () => {
files.forEach(file => { this.fs.readdir(sourcesPath, (err, files) => {
this.fs files.forEach(file => {
.createReadStream(this.path.join(sourcesPath, file)) this.fs
.pipe(this.fs.createWriteStream(this.path.join(this.appData, file))); .createReadStream(this.path.join(sourcesPath, file))
.pipe(this.fs.createWriteStream(this.path.join(this.appData, 'platform-tools', file)));
});
}); });
}); });
} }