version 1.9, 2001/04/16 13:16:10
|
version 1.12, 2001/04/16 13:48:14
|
Line 18 require "find.pl";
|
Line 18 require "find.pl";
|
sub wanted { |
sub wanted { |
(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && |
(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && |
-f _ && |
-f _ && |
/^.*\.meta$/ && !/^.+\.\d+\.[^\.]+\.meta$/ |
/^.*\.meta$/ && !/^.+\.\d+\.[^\.]+\.meta$/ && |
push(@metalist,"$dir/$_"); |
push(@metalist,"$dir/$_"); |
} |
} |
|
|
Line 57 foreach my $user (@homeusers) {
|
Line 57 foreach my $user (@homeusers) {
|
|
|
# -- process each file to get metadata and put into search catalog SQL database |
# -- process each file to get metadata and put into search catalog SQL database |
# Also, check to see if already there. |
# Also, check to see if already there. |
# I could not search first and just delete, but this works for now. |
# I could just delete (without searching first), but this works for now. |
foreach my $m (@metalist) { |
foreach my $m (@metalist) { |
my $ref=&metadata($m); |
my $ref=&metadata($m); |
my $m2=&declutter($m); |
my $m2='/res/'.&declutter($m); |
my $q2="select * from metadata where url like '$m2'"; |
$m2=~s/\.meta$//; |
|
my $q2="select * from metadata where url like binary '$m2'"; |
my $sth = $dbh->prepare($q2); |
my $sth = $dbh->prepare($q2); |
$sth->execute(); |
$sth->execute(); |
my $r1=$sth->fetchall_arrayref; |
my $r1=$sth->fetchall_arrayref; |
if (@$r1) { |
if (@$r1) { |
$sth=$dbh->prepare("delete from metadata where url like '$m2'"); |
$sth=$dbh->prepare("delete from metadata where url like binary '$m2'"); |
$sth->execute(); |
$sth->execute(); |
} |
} |
$sth=$dbh->prepare('insert into metadata values ('. |
$sth=$dbh->prepare('insert into metadata values ('. |