Compare commits
2 Commits
92125c7c4e
...
45095845fd
Author | SHA1 | Date |
---|---|---|
Peter J. Holzer | 45095845fd | |
Peter J. Holzer | 118bb0a2e7 |
|
@ -727,6 +727,9 @@ sub linkdup {
|
||||||
push @{ $self->{sessions_on_same_device} }, $r->{id}; # We only use the id
|
push @{ $self->{sessions_on_same_device} }, $r->{id}; # We only use the id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $self->{min_instance_id} = $self->{dbh}->selectrow_array("select min(id) from instances where session in " . join(", ", map("?", @{ $self->{sessions_on_same_device} })) . ")");
|
||||||
|
$self->log(3, "min_instance_id set to $self->{min_instance_id}");
|
||||||
|
|
||||||
}
|
}
|
||||||
my $tdb0 = gettimeofday();
|
my $tdb0 = gettimeofday();
|
||||||
my $tdb1;
|
my $tdb1;
|
||||||
|
@ -735,8 +738,9 @@ sub linkdup {
|
||||||
and file_owner=? and file_group=? and file_acl=?
|
and file_owner=? and file_group=? and file_acl=?
|
||||||
and file_unix_bits=?
|
and file_unix_bits=?
|
||||||
and checksum=? and online=1
|
and checksum=? and online=1
|
||||||
and instances.file=files.id
|
|
||||||
and versions2.id=instances.version
|
and versions2.id=instances.version
|
||||||
|
and instances.id >= ?
|
||||||
|
and instances.file=files.id
|
||||||
and instances.session=sessions.id
|
and instances.session=sessions.id
|
||||||
and sessions.id in (" . join(", ", map("?", @{ $self->{sessions_on_same_device} })) . ")" .
|
and sessions.id in (" . join(", ", map("?", @{ $self->{sessions_on_same_device} })) . ")" .
|
||||||
" order by instances.session desc
|
" order by instances.session desc
|
||||||
|
@ -746,6 +750,7 @@ sub linkdup {
|
||||||
$f->{o}, $f->{g}, $f->{acl},
|
$f->{o}, $f->{g}, $f->{acl},
|
||||||
join(',', map {$f->{$_} ? ($_) : ()} qw(setuid setgid sticky)),
|
join(',', map {$f->{$_} ? ($_) : ()} qw(setuid setgid sticky)),
|
||||||
$f->{checksum},
|
$f->{checksum},
|
||||||
|
$self->{min_instance_id},
|
||||||
@{ $self->{sessions_on_same_device} },
|
@{ $self->{sessions_on_same_device} },
|
||||||
);
|
);
|
||||||
my $st = stat($backup_filename);
|
my $st = stat($backup_filename);
|
||||||
|
|
|
@ -105,10 +105,13 @@ sub list {
|
||||||
$self->log(10, "list: in $File::Find::dir");
|
$self->log(10, "list: in $File::Find::dir");
|
||||||
if ($self->{prune}{$File::Find::dir}) {
|
if ($self->{prune}{$File::Find::dir}) {
|
||||||
return ();
|
return ();
|
||||||
} else {
|
|
||||||
# not sure if sorting is useful
|
|
||||||
return sort @_;
|
|
||||||
}
|
}
|
||||||
|
my $last_component = $File::Find::dir =~ s{.*/}{}r;
|
||||||
|
if ($self->{prune}{$last_component}) {
|
||||||
|
return ();
|
||||||
|
}
|
||||||
|
# not sure if sorting is useful
|
||||||
|
return sort @_;
|
||||||
},
|
},
|
||||||
wanted
|
wanted
|
||||||
=> sub {
|
=> sub {
|
||||||
|
|
Loading…
Reference in New Issue