Hi,
I currently investigate the problem at "Minimum Free Disk Space" setting not working/respected? . My config is this:
<?xml version="1.0" encoding="UTF-8"?><configuration version="28">
<folder id="android_sdk_built_for_x86_8cvj-photos" label="Camera" path="/storage/emulated/0/DCIM" type="sendonly" rescanIntervalS="3600" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="true" autoNormalize="true">
<filesystemType>basic</filesystemType>
<device id="AWEF5D3-UKS7WRS-76TPRA7-A7KVBZA-AX24ASZ-EKVUOY3-67ITRMM-IIWYFAY" introducedBy=""/>
<minDiskFree unit="%">5</minDiskFree>
<versioning type="trashcan">
<param key="cleanoutDays" val="39"/>
</versioning>
<copiers>0</copiers>
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
<hashers>1</hashers>
<order>random</order>
<ignoreDelete>false</ignoreDelete>
<scanProgressIntervalS>0</scanProgressIntervalS>
<pullerPauseS>0</pullerPauseS>
<maxConflicts>10</maxConflicts>
<disableSparseFiles>false</disableSparseFiles>
<disableTempIndexes>false</disableTempIndexes>
<paused>false</paused>
<weakHashThresholdPct>25</weakHashThresholdPct>
<markerName>.stfolder</markerName>
<useLargeBlocks>false</useLargeBlocks>
</folder>
The Android app uses “new Gson().toJson(restConfigResponse)” to parse the config. The class making deserialization is correct, checked twice. The fields “unit” and the text node “value” of minDiskFree aren’t deserialized and I instead get a null object which is wrong. So I dumped the parsed config readable to screen because to see why it doesn’t work.
"minDiskFree":{"unit":"%"}
Comparing this to the /rest/config response Chrome on PC gets, I see a slight mismatch which I suspect causing the above deserialization issue.
"minDiskFree": {
"value": 5,
"unit": "%"
},
Conclusion: a) The /rest/config endpoint offers the correct config in text form as Chrome on PC can also see it and the app uses the same endpoint to retrieve the config. b) The deserialization of “value: [no matter what I enter for test]” always fails leaving the created JAVA class holding the data with “null” behind. c) The gson() class seems to have its problem with the xml text node holding the value, in example the “5” and cancels the whole part to deserialize. That’s why I also don’t get “String unit”.
Dear Core devs,
could you please make the “minDiskFree” xml node in config and REST json the same way structured as it’s already the case for:
<versioning type="trashcan">
<param key="cleanoutDays" val="39"/>
</versioning>
The contents deserialize correctly with the gson() module on Android.
If there’s another probably easier solution, I’d appreciate a tip where to look at.
Kind regards Catfriend1