mirror of
https://codeberg.org/scip/note.git
synced 2025-12-16 20:21:04 +01:00
Fix confusion of new users regarding db files.
Now, we're using a different file extension for every db file type. That way, if the user tries another file type and forgets to specify a filename, the default is NOT to use the same one as before, but another file. That way the message "file is encrypted" will not appear anymore, if a new user follows the above steps.
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
package NOTEDB::binary;
|
package NOTEDB::binary;
|
||||||
|
|
||||||
$NOTEDB::binary::VERSION = "1.12";
|
$NOTEDB::binary::VERSION = "1.13";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use IO::Seekable;
|
use IO::Seekable;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
package NOTEDB::dbm;
|
package NOTEDB::dbm;
|
||||||
|
|
||||||
$NOTEDB::dbm::VERSION = "1.41";
|
$NOTEDB::dbm::VERSION = "1.42";
|
||||||
|
|
||||||
use DB_File;
|
use DB_File;
|
||||||
use NOTEDB;
|
use NOTEDB;
|
||||||
@@ -29,7 +29,7 @@ sub new
|
|||||||
|
|
||||||
my $notefile = "note.dbm";
|
my $notefile = "note.dbm";
|
||||||
my $timefile = "date.dbm";
|
my $timefile = "date.dbm";
|
||||||
my $dbm_dir = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".note_dbm");
|
my $dbm_dir = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb.dbm");
|
||||||
|
|
||||||
if (! -d $dbm_dir) {
|
if (! -d $dbm_dir) {
|
||||||
# try to make it
|
# try to make it
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
package NOTEDB::dumper;
|
package NOTEDB::dumper;
|
||||||
|
|
||||||
$NOTEDB::dumper::VERSION = "1.02";
|
$NOTEDB::dumper::VERSION = "1.03";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
@@ -29,7 +29,7 @@ sub new {
|
|||||||
my $self = {};
|
my $self = {};
|
||||||
bless($self,$class);
|
bless($self,$class);
|
||||||
|
|
||||||
$self->{NOTEDB} = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb");
|
$self->{NOTEDB} = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb.dumper");
|
||||||
|
|
||||||
if(! -e $param{dbname}) {
|
if(! -e $param{dbname}) {
|
||||||
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
package NOTEDB::general;
|
package NOTEDB::general;
|
||||||
|
|
||||||
$NOTEDB::general::VERSION = "1.04";
|
$NOTEDB::general::VERSION = "1.05";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
#use Data::Dumper;
|
#use Data::Dumper;
|
||||||
@@ -31,7 +31,7 @@ sub new {
|
|||||||
my $self = {};
|
my $self = {};
|
||||||
bless($self,$class);
|
bless($self,$class);
|
||||||
|
|
||||||
$self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb");
|
$self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb.txt");
|
||||||
|
|
||||||
if(! -e $param{dbname}) {
|
if(! -e $param{dbname}) {
|
||||||
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
package NOTEDB::pwsafe3;
|
package NOTEDB::pwsafe3;
|
||||||
|
|
||||||
$NOTEDB::pwsafe3::VERSION = "1.08";
|
$NOTEDB::pwsafe3::VERSION = "1.09";
|
||||||
use strict;
|
use strict;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use Time::Local;
|
use Time::Local;
|
||||||
@@ -28,7 +28,7 @@ sub new {
|
|||||||
my $self = {};
|
my $self = {};
|
||||||
bless($self,$class);
|
bless($self,$class);
|
||||||
|
|
||||||
$self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb");
|
$self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb.psafe3");
|
||||||
|
|
||||||
$self->{mtime} = $self->get_stat();
|
$self->{mtime} = $self->get_stat();
|
||||||
$self->{unread} = 1;
|
$self->{unread} = 1;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
package NOTEDB::text;
|
package NOTEDB::text;
|
||||||
|
|
||||||
$NOTEDB::text::VERSION = "1.04";
|
$NOTEDB::text::VERSION = "1.05";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
#use Data::Dumper;
|
#use Data::Dumper;
|
||||||
@@ -30,7 +30,7 @@ sub new {
|
|||||||
my $self = {};
|
my $self = {};
|
||||||
bless($self,$class);
|
bless($self,$class);
|
||||||
|
|
||||||
$self->{NOTEDB} = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb");
|
$self->{NOTEDB} = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb.storable");
|
||||||
|
|
||||||
if(! -e $param{dbname}) {
|
if(! -e $param{dbname}) {
|
||||||
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user