Settings for shares weren't being saved. Reported by "TripKnot". Also,
the fix for non-share settings was erroneous (it needs replace()
rather than lstrip()).