mirror of https://github.com/arendst/Tasmota.git
allow folders to be added to the filesystem (#18926)
This commit is contained in:
parent
5248641836
commit
325ceef839
|
@ -77,7 +77,10 @@ def esp32_build_filesystem(fs_size):
|
||||||
else:
|
else:
|
||||||
print("Failed to download: ",file)
|
print("Failed to download: ",file)
|
||||||
continue
|
continue
|
||||||
shutil.copy(file, filesystem_dir)
|
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):
|
if not os.listdir(filesystem_dir):
|
||||||
print("No files added -> will NOT create littlefs.bin and NOT overwrite fs partition!")
|
print("No files added -> will NOT create littlefs.bin and NOT overwrite fs partition!")
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue