version: skip file read if $Id$ found, close file after reading
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@10470 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -41,9 +41,14 @@ CommandVersion($$)
|
||||
$line = cfgDB_Fileversion($fn,$line);
|
||||
}
|
||||
} else {
|
||||
($line) = grep(/#.*\$Id\:[^\$\n\r].+\$/, <FH>);
|
||||
while(<FH>) {
|
||||
if(/#.*\$Id\:[^\$\n\r].+\$/) {
|
||||
$line = $_;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(FH);
|
||||
}
|
||||
|
||||
$line = "No Id found for $mod_name" unless($line);
|
||||
push @ret, $line;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user