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:
markusbloch
2016-01-11 23:05:37 +00:00
parent 2147c69c28
commit b6dd9a2d72

View File

@@ -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;
}