Skip to content

Commit b957bad

Browse files
author
Alberto Iannaccone
committed
prevent from pushing files that are bigger than 100 KB
1 parent 80fa2ab commit b957bad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,10 @@ export class CloudSketchbookTree extends SketchbookTree {
246246
});
247247

248248
if (!fileStat.children || !fileStat.isDirectory) {
249-
return [fileStat.resource];
249+
// Do not push files bigger than 100KB
250+
return fileStat.size && fileStat.size > 100 * 1024 /* 100 KB */
251+
? []
252+
: [fileStat.resource];
250253
}
251254

252255
let childrenUris: URI[] = [];

0 commit comments

Comments
 (0)