2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-16 10:46:03 +00:00

version: skip file read if $Id$ found, close file after reading

git-svn-id: https://svn.fhem.de/fhem/trunk@10470 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2016-01-11 23:05:37 +00:00
parent 4c53a98afb
commit a0ee73acc3

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