FIXED: most config variables not related to drivers had

invalid sentence in note, so the new ones of the new config
                were ignored.
FIXED:          added version to NOTEDB::text.
FIXED:          fixed handling of NOTEDB::crypt_supported, now encryption
                works again.
ADDED:          NOTEDB::text now supports internal caching too.
CHANGED:        lock() sets the umask internally to 022, so that other
                users are able to read the lockfile.
This commit is contained in:
TLINDEN
2012-02-10 20:31:13 +01:00
parent 773584e400
commit b2b5cea5ec
10 changed files with 117 additions and 87 deletions

View File

@@ -4,7 +4,7 @@
package NOTEDB::general;
$NOTEDB::general::VERSION = "1.00";
$NOTEDB::general::VERSION = "1.01";
use strict;
#use Data::Dumper;
@@ -258,6 +258,7 @@ sub uen {
eval {
$crypted = $this->{cipher}->encrypt($raw);
};
print $@;
}
else {
$crypted = $raw;
@@ -287,8 +288,13 @@ sub _store {
open NOTE, ">$this->{dbname}" or die "could not open $this->{dbname}: $!\n";
flock NOTE, LOCK_EX;
my $content = SaveConfigString($data) or die "could not serialize data: $!\n";
print NOTE $content;
if (%{$data}) {
my $content = SaveConfigString($data) or die "could not serialize data: $!\n";
print NOTE $content;
}
else {
print NOTE "";
}
flock NOTE, LOCK_UN;
close NOTE;