Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c17045ff

Von Jan Büren vor 11 Monaten hinzugefügt

  • ID c17045ff0b71a15fb0013079f2bcf21300d0c4f6
  • Vorgänger 6e0c953b
  • Nachfolger 46d48c74

Kosmetik, Überprüfung auf exakten Typ

Unterschiede anzeigen:

SL/File/Backend/Filesystem.pm
sub save {
my ($self, %params) = @_;
die 'dbfile not exists' unless $params{dbfile};
my $dbfile = $params{dbfile};
die 'no file contents' unless $params{file_path} || $params{file_contents};
die 'dbfile not exists' unless ref $params{dbfile} eq 'SL::DB::File';
die 'no file contents' unless $params{file_path} || $params{file_contents};
my $dbfile = delete $params{dbfile};
# Do not save and do not create a new version of the document if file size of last version is the same.
if ($dbfile->source eq 'created' && $self->get_version_count(dbfile => $dbfile)) {
......
my $tofile = $self->_filesystem_path($dbfile);
if ($params{file_path} && -f $params{file_path}) {
File::Copy::copy($params{file_path}, $tofile);
}
elsif ($params{file_contents}) {
} elsif ($params{file_contents}) {
open(OUT, "> " . $tofile);
print OUT $params{file_contents};
close(OUT);

Auch abrufbar als: Unified diff