aboutsummaryrefslogtreecommitdiff
path: root/SBO-Lib/lib/SBO/Lib.pm
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-11-26 04:39:36 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-11-26 04:39:36 +0100
commit3fbc4104c833ba480752ef0e822d9d284a055e97 (patch)
tree7efa2f8f2ee666756d3860512b42a4c346f4a12d /SBO-Lib/lib/SBO/Lib.pm
parent4a19ce0f3f99d8d74bd4d39bde2e01d9d4906fbd (diff)
downloadsbotools2-3fbc4104c833ba480752ef0e822d9d284a055e97.tar.xz
Move seek in get_src_dir to inside the loop
Diffstat (limited to 'SBO-Lib/lib/SBO/Lib.pm')
-rw-r--r--SBO-Lib/lib/SBO/Lib.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
index 0f1eae2..0f67f1b 100644
--- a/SBO-Lib/lib/SBO/Lib.pm
+++ b/SBO-Lib/lib/SBO/Lib.pm
@@ -700,7 +700,6 @@ sub get_pkg_name {
sub get_src_dir {
exists $_[0] or script_error('get_src_dir requires an argument');
my $fh = shift;
- seek $fh, 0, 0;
my @src_dirs;
# scripts use either $TMP or /tmp/SBo
if (opendir(my $tsbo_dh, $tmpd)) {
@@ -708,6 +707,7 @@ sub get_src_dir {
next FIRST if $ls =~ /^\.[\.]{0,1}$/;
next FIRST if $ls =~ /^package-/;
my $found = 0;
+ seek $fh, 0, 0;
SECOND: while (my $line = <$fh>) {
if ($line =~ /$ls/) {
$found++;