Skip to content

Commit

Permalink
Remove extra layer in zip include dir
Browse files Browse the repository at this point in the history
  • Loading branch information
monkbroc committed Dec 18, 2024
1 parent 440bbb1 commit ecd66c7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cmd/flash.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,13 @@ module.exports = class FlashCommand extends CLICommandBase {
if (stats.isDirectory()) {
updateFolder = path.dirname(input);
const dirInfo = await this._extractFlashFilesFromDir(input);
includeDir = path.join(path.basename(input),dirInfo.baseDir);
includeDir = path.join(path.basename(input), dirInfo.baseDir);
filesToProgram = dirInfo.filesToProgram;
} else if (utilities.getFilenameExt(input) === '.zip') {
updateFolder = path.dirname(input);
zipFile = path.basename(input);
const zipInfo = await this._extractFlashFilesFromZip(input);
const zipFileName = path.basename(input, '.zip'); // remove the .zip extension
includeDir = path.join(zipFileName, zipInfo.baseDir);
includeDir = zipInfo.baseDir;
filesToProgram = zipInfo.filesToProgram;
} else {
filesToProgram = files;
Expand Down

0 comments on commit ecd66c7

Please sign in to comment.