Why should it get lost if there is a partition-scheme?
Why would somebody do the effort of using a tool like LittleFS-Data-Upload-Tool if it can happen that the content gets erased?
Or
Do you mean the existing LittleFS-Data-Upload-Tool is working this way:
earse all in the FS-partition and write everything new from the subfolder data?
hm - this is an idea too:
not a second upload-to-flash-tool but a tool that copies the actual sourcecode to a subfolder of subfolder "data" and then using the existing LittleFS-Data-Upload-Tool.
Will to have to test if the existing LittleFS-Data-Upload-Tool manages sub-sub-folders.
best regards Stefan