Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not auto-resize FS with embedded files in the firmware #19059

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions tasmota/tasmota_xdrv_driver/xdrv_52_7_berry_embedded.ino
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,18 @@ const char berry_prog[] =
"def log(m,l) tasmota.log(m,l) end "
"def load(f) return tasmota.load(f) end "

// try to resize FS to max at first boot
// try to resize FS to max at first boot, if not already populated with embedded files
// "tasmota.log('>>> bootcount=' + str(tasmota.settings.bootcount), 2) "
"if tasmota.settings.bootcount == 0 "
"import partition_core "
"var p = partition_core.Partition() "
"p.resize_fs_to_max() "
"import path "
"var fc = size(path.listdir('/')) "
"if fc < 2 " // only .settings allowed to get deleted, do not delete custom files from the factory.bin
"import partition_core "
"var p = partition_core.Partition() "
"p.resize_fs_to_max() "
"else "
"log(f'BRY: {fc} files in FS, will not resize partition',2) "
"end "
"end "

#ifdef USE_AUTOCONF
Expand Down