Revision 6969d5c2
Von Martin Helmling martin.helmling@octosoft.eu vor fast 8 Jahren hinzugefügt
SL/File.pm | ||
---|---|---|
126 | 126 |
my $rc = SL::DB->client->with_transaction(\&_delete, $self, %params); |
127 | 127 |
if (!$rc) { |
128 | 128 |
my $err = SL::DB->client->error; |
129 |
die (ref $err?$$err:$err);
|
|
129 |
die $err?(ref $err?$$err:$err):"unknown err";
|
|
130 | 130 |
} |
131 | 131 |
return $rc; |
132 | 132 |
} |
SL/File/Backend/Filesystem.pm | ||
---|---|---|
54 | 54 |
sub save { |
55 | 55 |
my ($self, %params) = @_; |
56 | 56 |
die 'dbfile not exists' unless $params{dbfile}; |
57 |
$main::lxdebug->message(LXDebug->DEBUG2(), "in backend " . $self . " file " . $params{dbfile}); |
|
58 |
$main::lxdebug->message(LXDebug->DEBUG2(), "file id=" . $params{dbfile}->id . " path=" . $params{file_path}); |
|
59 | 57 |
my $dbfile = $params{dbfile}; |
60 | 58 |
die 'no file contents' unless $params{file_path} || $params{file_contents}; |
61 | 59 |
$dbfile->backend_data(0) unless $dbfile->backend_data; |
... | ... | |
63 | 61 |
$dbfile->save->load; |
64 | 62 |
|
65 | 63 |
my $tofile = $self->_filesystem_path($dbfile); |
66 |
$main::lxdebug->message(LXDebug->DEBUG2(), "topath=" . $tofile . " from=" . $params{file_path}); |
|
67 | 64 |
if ($params{file_path} && -f $params{file_path}) { |
68 | 65 |
File::Copy::copy($params{file_path}, $tofile); |
69 | 66 |
} |
... | ... | |
85 | 82 |
my ($self, %params) = @_; |
86 | 83 |
die "no dbfile" unless $params{dbfile}; |
87 | 84 |
$main::lxdebug->message(LXDebug->DEBUG2(), "version=" .$params{version}); |
88 |
die "unknown version" if $params{version} &&
|
|
85 |
die "unknown version" if $params{version} && |
|
89 | 86 |
($params{version} < 0 || $params{version} > $params{dbfile}->backend_data) ; |
90 | 87 |
my $path = $self->_filesystem_path($params{dbfile},$params{version}); |
91 | 88 |
die "no file found in backend" if !-f $path; |
... | ... | |
181 | 178 |
Martin Helmling E<lt>martin.helmling@opendynamic.deE<gt> |
182 | 179 |
|
183 | 180 |
=cut |
184 |
|
|
185 |
|
Auch abrufbar als: Unified diff
Für t/file/filesystem.t Anpassungen im Debug und Fehlermeldung
Nun läuft der Test wieder