allow folders to be added to the filesystem (#18926)

This commit is contained in:
Christian Baars 2023-06-21 18:32:42 +02:00 committed by GitHub
parent 5248641836
commit 325ceef839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -77,6 +77,9 @@ def esp32_build_filesystem(fs_size):
else:
print("Failed to download: ",file)
continue
if os.path.isdir(file):
shutil.copytree(file, filesystem_dir, dirs_exist_ok=True)
else:
shutil.copy(file, filesystem_dir)
if not os.listdir(filesystem_dir):
print("No files added -> will NOT create littlefs.bin and NOT overwrite fs partition!")