Browse Source

scripts: Do not prefix paths with ./ before calling open

All those paths are now being opened with the three-form open call, so
there's not going to be any kind of ambiguity, just stop prefixing them.
Guillem Jover 12 years ago
parent
commit
13b173b908
3 changed files with 0 additions and 4 deletions
  1. 0 1
      scripts/dpkg-distaddfile.pl
  2. 0 2
      scripts/dpkg-gencontrol.pl
  3. 0 1
      scripts/dpkg-shlibdeps.pl

+ 0 - 1
scripts/dpkg-distaddfile.pl

@@ -83,7 +83,6 @@ sysopen($lockfh, $lockfile, O_WRONLY) ||
     syserr(_g('cannot write %s'), $lockfile);
 file_lock($lockfh, $lockfile);
 
-$fileslistfile="./$fileslistfile" if $fileslistfile =~ m/^\s/;
 open(my $fileslistnew_fh, '>', "$fileslistfile.new") ||
     syserr(_g('open new files list file'));
 if (open(my $fileslist_fh, '<', $fileslistfile)) {

+ 0 - 2
scripts/dpkg-gencontrol.pl

@@ -363,7 +363,6 @@ sysopen($lockfh, $lockfile, O_WRONLY) ||
     syserr(_g('cannot write %s'), $lockfile);
 file_lock($lockfh, $lockfile);
 
-$fileslistfile="./$fileslistfile" if $fileslistfile =~ m/^\s/;
 open(my $fileslistnew_fh, '>', "$fileslistfile.new") ||
     syserr(_g('open new files list file'));
 binmode($fileslistnew_fh);
@@ -403,7 +402,6 @@ my $cf;
 my $fh_output;
 if (!$stdout) {
     $cf= "$packagebuilddir/DEBIAN/control";
-    $cf= "./$cf" if $cf =~ m/^\s/;
     open($fh_output, '>', "$cf.new") ||
         syserr(_g("cannot open new output control file \`%s'"), "$cf.new");
 } else {

+ 0 - 1
scripts/dpkg-shlibdeps.pl

@@ -687,7 +687,6 @@ sub extract_from_shlibs {
 	return;
     }
     # Open shlibs file
-    $shlibfile = "./$shlibfile" if $shlibfile =~ m/^\s/;
     open(my $shlibs_fh, '<', $shlibfile) ||
         syserr(_g("unable to open shared libs info file \`%s'"), $shlibfile);
     my $dep;