Skip to content

Commit

Permalink
fix(TwinMakerTools): added a additional condition to prevent saving a…
Browse files Browse the repository at this point in the history
…n s3 folder as a model
  • Loading branch information
gsechkin-aws authored and matwld committed Apr 5, 2023
1 parent 4adf7ca commit a991335
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packages/tools-iottwinmaker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ You can follow [AWS IoT TwinMaker Getting Started](https://github.com/aws-sample
First clone the latest tip of this tool:

```
git clone https://github.com/johnnyw-aws/aws-iot-twinmaker-samples --depth 1 --branch main-tmdt && cd aws-iot-twinmaker-samples/src/libs/tmdt
git clone https://github.com/awslabs/iot-app-kit.git && cd iot-app-kit/packages/tools-iottwinmaker
```

Navigate to the `tmdt` directory and install any node dependencies:
Navigate to the `tools-iottwinmaker` directory and install any node dependencies:

```
cd src/libs/tmdt
npm install
```
Build the package:
Expand Down
2 changes: 1 addition & 1 deletion packages/tools-iottwinmaker/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async function import_scenes_and_models(workspaceIdStr: string, tmdt_config: tmd
if (objlist['Contents'] != undefined) {
const contents = objlist['Contents'];
for (const [, value] of Object.entries(contents)) {
if ('Key' in value) {
if ('Key' in value && value['Size'] && value['Size'] > 0) {
// TODO consider path.join in all s3 URI for better cross platform support?
modelFiles.add(`s3://${s3bucket}/${value['Key']}`);
}
Expand Down

0 comments on commit a991335

Please sign in to comment.