I think this is a real bug, but it can perfectly be a misunderstanding on my side:
#include <pjsr/DataType.jsh>
var tmp;
Settings.write ("FOO/bar", DataType_UInt8, 42);
tmp = Settings.read ("FOO/bar", DataType_UInt8);
if (Settings.lastReadOK)
console.writeln ("read 1 ok, tmp (",tmp,")");
Settings.remove ("FOO");
// this read should fail...
tmp = Settings.read ("FOO/bar", DataType_UInt8);
// ...thus, this conditional should be false
if (Settings.lastReadOK)
console.writeln ("read 2 ok, tmp (",tmp,")");
Settings.remove ("FOO/bar"); // another try...
tmp = Settings.read ("FOO/bar", DataType_UInt8);
if (Settings.lastReadOK)
console.writeln ("read 3 ok, tmp (",tmp,")");
Settings.remove ("FOO/*"); // and just another one
tmp = Settings.read ("FOO/bar", DataType_UInt8);
if (Settings.lastReadOK)
console.writeln ("read 4 ok, tmp (",tmp,")");
Processing script file: /home/hue/foo.js
read 1 ok, tmp (42)
read 2 ok, tmp (null)
read 3 ok, tmp (null)
read 4 ok, tmp (null)