fixed some issues in the initial adb download

This commit is contained in:
Your Name
2020-08-17 13:31:49 +01:00
parent 68f93adb1c
commit 453e05c034
3 changed files with 6 additions and 9 deletions
+6 -6
View File
@@ -236,13 +236,13 @@ export class AppService {
await this.mkdir(this.path.join(this.appData, 'platform-tools'));
try {
let files = this.fs.readdirSync(sourcesPath);
files.forEach(file => {
this.fs
.createReadStream(this.path.join(sourcesPath, file))
.pipe(this.fs.createWriteStream(this.path.join(this.appData, 'platform-tools', file)));
});
for (let i = 0; i < files.length; i++) {
this.fs.copyFileSync(
this.path.join(sourcesPath, files[i]),
this.path.join(this.appData, 'platform-tools', files[i])
);
}
if (this.os.platform() === 'darwin' || this.os.platform() === 'linux') {
console.log(this.path.join(this.appData, 'platform-tools', 'adb'));
this.setExecutable(this.path.join(this.appData, 'platform-tools', 'adb')).then(() =>
setTimeout(() => resolve(), 5000)
);