mirror of
https://codeberg.org/scip/note.git
synced 2025-12-16 20:21:04 +01:00
FIXED: NOTEDB::pwsafe3 contained the old python stuff in delete code.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
1.3.11:
|
||||
FIXED: NOTEDB::pwsafe3 contained the old python stuff in delete code.
|
||||
================================================================================
|
||||
1.3.10:
|
||||
FIXED: the YAML export/import change were missing too. grml...
|
||||
FIXED: NOTEDB::general backend fixed loading Config::General
|
||||
|
||||
@@ -10,7 +10,7 @@ package NOTEDB;
|
||||
use Exporter ();
|
||||
use vars qw(@ISA @EXPORT $crypt_supported);
|
||||
|
||||
$NOTEDB::VERSION = "1.33";
|
||||
$NOTEDB::VERSION = "1.34";
|
||||
|
||||
BEGIN {
|
||||
# make sure, it works, otherwise encryption
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package NOTEDB::pwsafe3;
|
||||
|
||||
$NOTEDB::pwsafe3::VERSION = "1.00";
|
||||
$NOTEDB::pwsafe3::VERSION = "1.01";
|
||||
|
||||
use strict;
|
||||
use Data::Dumper;
|
||||
@@ -228,22 +228,31 @@ sub set_new {
|
||||
sub set_del {
|
||||
my($this, $num) = @_;
|
||||
|
||||
my $uuid = $this->_getuuid($num);
|
||||
if(! $uuid) {
|
||||
print "Note $num does not exist!\n";
|
||||
return;
|
||||
}
|
||||
|
||||
my $fh = new FileHandle "<$this->{dbname}" or die "could not open $this->{dbname}\n";
|
||||
flock $fh, LOCK_EX;
|
||||
|
||||
my $key = $this->_getpass();
|
||||
eval {
|
||||
my $vault = new Vault($key, $this->{dbname});
|
||||
$vault->delrecord($this->_getuuid($num));
|
||||
|
||||
$vault->write_to_file($this->{dbname}, $key);
|
||||
my $vault = new Crypt::PWSafe3(password => $key, file => $this->{dbname});
|
||||
delete $vault->{record}->{$uuid};
|
||||
$vault->markmodified();
|
||||
$vault->save();
|
||||
};
|
||||
if ($@) {
|
||||
print "Exception caught:\n$@\n";
|
||||
exit 1;
|
||||
}
|
||||
flock $fh, LOCK_UN;
|
||||
$fh->close();
|
||||
|
||||
eval {
|
||||
flock $fh, LOCK_UN;
|
||||
$fh->close();
|
||||
};
|
||||
|
||||
# finally re-read the db, so that we always have the latest data
|
||||
$this->_retrieve($key);
|
||||
|
||||
2
README
2
README
@@ -1,4 +1,4 @@
|
||||
note 1.3.10 by Thomas Linden, 02/09/2012
|
||||
note 1.3.11 by Thomas Linden, 02/10/2012
|
||||
=======================================
|
||||
|
||||
Introduction
|
||||
|
||||
2
bin/note
2
bin/note
@@ -141,7 +141,7 @@ $CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
|
||||
$USER = getlogin || getpwuid($<);
|
||||
chomp $USER;
|
||||
$TOPIC = 1;
|
||||
$version = "1.3.10";
|
||||
$version = "1.3.11";
|
||||
$CurDepth = 1; # the current depth inside the topic "directory" structure...
|
||||
$maxlen = "auto";
|
||||
$timelen = 22;
|
||||
|
||||
Reference in New Issue
Block a user