mirror of
https://codeberg.org/scip/note.git
synced 2025-12-17 12:41:10 +01:00
removed locking in NOTEDB::pwsafe3::_retrieve() which was senseless.
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
1.3.14:
|
1.3.14:
|
||||||
|
fixed bug in NOTEDB::pwsafe3 backend, it used lockging on the
|
||||||
|
database file for reading, which is wrong.
|
||||||
|
================================================================================
|
||||||
|
1.3.13:
|
||||||
ADDED: new config parameter 'motd', a note entry which will be shown
|
ADDED: new config parameter 'motd', a note entry which will be shown
|
||||||
on startup (if exists).
|
on startup (if exists).
|
||||||
CHANGED: the prompt will now show if the current instance is running
|
CHANGED: the prompt will now show if the current instance is running
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ package NOTEDB;
|
|||||||
use Exporter ();
|
use Exporter ();
|
||||||
use vars qw(@ISA @EXPORT $crypt_supported);
|
use vars qw(@ISA @EXPORT $crypt_supported);
|
||||||
|
|
||||||
$NOTEDB::VERSION = "1.35";
|
$NOTEDB::VERSION = "1.36";
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
# make sure, it works, otherwise encryption
|
# make sure, it works, otherwise encryption
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
package NOTEDB::pwsafe3;
|
package NOTEDB::pwsafe3;
|
||||||
|
|
||||||
$NOTEDB::pwsafe3::VERSION = "1.01";
|
$NOTEDB::pwsafe3::VERSION = "1.02";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
@@ -310,9 +310,6 @@ sub _retrieve {
|
|||||||
my $file = $this->{dbname};
|
my $file = $this->{dbname};
|
||||||
if (-s $file) {
|
if (-s $file) {
|
||||||
if ($this->filechanged() || $this->{unread}) {
|
if ($this->filechanged() || $this->{unread}) {
|
||||||
my $fh = new FileHandle "<$this->{dbname}" or die "could not open $this->{dbname}\n";
|
|
||||||
flock $fh, LOCK_EX;
|
|
||||||
|
|
||||||
my %data;
|
my %data;
|
||||||
if (! $key) {
|
if (! $key) {
|
||||||
$key = $this->_getpass();
|
$key = $this->_getpass();
|
||||||
@@ -341,9 +338,6 @@ sub _retrieve {
|
|||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
flock $fh, LOCK_UN;
|
|
||||||
$fh->close();
|
|
||||||
|
|
||||||
$this->{unread} = 0;
|
$this->{unread} = 0;
|
||||||
$this->{data} = \%data;
|
$this->{data} = \%data;
|
||||||
return %data;
|
return %data;
|
||||||
|
|||||||
2
bin/note
2
bin/note
@@ -144,7 +144,7 @@ $CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
|
|||||||
$USER = getlogin || getpwuid($<);
|
$USER = getlogin || getpwuid($<);
|
||||||
chomp $USER;
|
chomp $USER;
|
||||||
$TOPIC = 1;
|
$TOPIC = 1;
|
||||||
$version = "1.3.13";
|
$version = "1.3.14";
|
||||||
$CurDepth = 1; # the current depth inside the topic "directory" structure...
|
$CurDepth = 1; # the current depth inside the topic "directory" structure...
|
||||||
$maxlen = "auto";
|
$maxlen = "auto";
|
||||||
$timelen = 22;
|
$timelen = 22;
|
||||||
|
|||||||
Reference in New Issue
Block a user