From 64e7948b559a7c66bdf216f15a9604b62dc041db Mon Sep 17 00:00:00 2001 From: "git@daemon.de" Date: Mon, 9 Feb 2015 11:29:05 +0100 Subject: [PATCH] fixed changing note id bug --- Changelog | 5 +++++ NOTEDB.pm | 4 ++-- NOTEDB/pwsafe3.pm | 6 +++--- README | 8 ++++---- VERSION | 2 +- bin/note | 4 ++-- note.pod | 5 ++--- 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Changelog b/Changelog index 8906576..055343f 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,8 @@ +1.3.20: + fixed bug in NOTEDB::pwsafe3::_retrieve(), it iterated over the + records unsorted which resulted in different note ids each time + the program runs. +================================================================================ 1.3.19: revert fix in NOTEDB::pwsafe3::filechanged(), use > again. ================================================================================ diff --git a/NOTEDB.pm b/NOTEDB.pm index f392c31..a1f4d44 100644 --- a/NOTEDB.pm +++ b/NOTEDB.pm @@ -2,7 +2,7 @@ # this is a generic module, used by note database # backend modules. # -# Copyright (c) 2000-2013 Thomas Linden +# Copyright (c) 2000-2015 T.v.Dein package NOTEDB; @@ -10,7 +10,7 @@ package NOTEDB; use Exporter (); use vars qw(@ISA @EXPORT $crypt_supported); -$NOTEDB::VERSION = "1.40"; +$NOTEDB::VERSION = "1.41"; BEGIN { # make sure, it works, otherwise encryption diff --git a/NOTEDB/pwsafe3.pm b/NOTEDB/pwsafe3.pm index 49409a8..a8281f1 100644 --- a/NOTEDB/pwsafe3.pm +++ b/NOTEDB/pwsafe3.pm @@ -3,7 +3,7 @@ package NOTEDB::pwsafe3; -$NOTEDB::pwsafe3::VERSION = "1.05"; +$NOTEDB::pwsafe3::VERSION = "1.06"; use lib qw(/home/scip/D/github/Crypt--PWSafe3/blib/lib); use strict; use Data::Dumper; @@ -324,7 +324,7 @@ sub _retrieve { my @records = $vault->getrecords(); - foreach my $record (@records) { + foreach my $record (sort { $a->uuid cmp $b->uuid } @records) { my $num = $this->_uuid( $record->uuid ); my %entry = ( uuid => $record->uuid, @@ -502,7 +502,7 @@ sub _getpass { } else { my $key; - print "pwsafe password: "; + print STDERR "pwsafe password: "; eval { local($|) = 1; local(*TTY); diff --git a/README b/README index dbe9cb5..fffc6ae 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -note 1.3.16 by Thomas Linden, 20/06/2013 +note 1.3.20 by T.v.Dein (09/02/2015) ======================================= Introduction @@ -193,8 +193,8 @@ You may also refer to the note website http://www.daemon.de/note/. Author and Copyright ==================== -The author is Thomas Linden. -note is Copyright of Thomas Linden. +The author is T.v.Dein +note is Copyright of T.v.Dein Contributors / Credits @@ -214,4 +214,4 @@ and I'll add you. Last changed ============ -20/06/2013 +09/02/2015 \ No newline at end of file diff --git a/VERSION b/VERSION index ef40e4d..3c59b40 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.17 +1.3.20 diff --git a/bin/note b/bin/note index 87492a1..a02400c 100755 --- a/bin/note +++ b/bin/note @@ -1,7 +1,7 @@ #!/usr/bin/perl # # note - console notes management with database and encryption support. -# Copyright (C) 1999-2013 Thomas Linden (see README for details!) +# Copyright (C) 1999-2015 T.v.Dein (see README for details!) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -144,7 +144,7 @@ $CONF = File::Spec->catfile($ENV{HOME}, ".noterc"); $USER = getlogin || getpwuid($<); chomp $USER; $TOPIC = 1; -$version = "1.3.19"; +$version = "1.3.20"; $CurDepth = 1; # the current depth inside the topic "directory" structure... $maxlen = "auto"; $timelen = 22; diff --git a/note.pod b/note.pod index d758242..6a86095 100644 --- a/note.pod +++ b/note.pod @@ -530,11 +530,10 @@ at the supplied sample configuration file in B. =head1 AUTHOR -Thomas Linden - +T.v.Dein =head1 VERSION -1.3.14 (28/11/2012) +1.3.20 =cut