fix binary detection
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 6 Aug 2010 18:15:56 +0000 (20:15 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 6 Aug 2010 18:15:56 +0000 (20:15 +0200)
lib/RFID/Biblio/librfid.pm

index a8044ee..a7e8f00 100644 (file)
@@ -32,7 +32,13 @@ our $bin = '/rest/cvs/librfid/utils/librfid-tool';
 
 sub init {
        my $self = shift;
-       warn "# no $bin found\n" if ! -e $bin;
+       if ( -e $bin ) {
+               warn "# using $bin";
+               return 1;
+       } else {
+               warn "# no $bin found\n";
+               return 0;
+       }
 }
 
 sub _grep_tool {