--- trunk/perl/scripts/est-spider 2005/09/18 18:21:06 30 +++ trunk/perl/scripts/est-spider 2005/09/21 15:59:54 31 @@ -32,6 +32,11 @@ my $dir = shift @ARGV || die "usage: $0 [dir]"; +if (! -e $dir) { + warn "directory $dir doesn't exist, skipping\n"; + exit 1; +} + #my $basedir = $0; #$basedir =~ s,/[^/]+$,/,; #require "$basedir/filter.pm"; @@ -138,7 +143,7 @@ return if (! $force && -l $path || $path =~ m#/.svn# || $path =~ m/(~|.bak)$/); - my $mtime = (stat($path))[9]; + my $mtime = (stat($path))[9] || -1; my $mtime_db = $db->get_doc_attr_by_uri("file:///$path", '@mtime') || -2; if ($mtime == $mtime_db) {