Skip to content

Commit d79bd56

Browse files
thunderaceigrr
authored andcommitted
dont create spiffs image if input dir does not exist (earlephilhower#35)
1 parent d8ad6e4 commit d79bd56

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,11 @@ bool unpackFiles(std::string sDest) {
435435
// Actions
436436

437437
int actionPack() {
438+
if (!dirExists(s_dirName.c_str())) {
439+
std::cerr << "error: can't read source directory" << std::endl;
440+
return 1;
441+
}
442+
438443
s_flashmem.resize(s_imageSize, 0xff);
439444

440445
FILE* fdres = fopen(s_imageName.c_str(), "wb");

0 commit comments

Comments
 (0)