I'm not a perl programmer I work with C and TCL, but I had a look at
/usr/bin/atool.

The problem is in the unlink_directory subroutine ...

====================================================================
sub unlink_directory($) {
  my ($dir) = @_;
  die "$::basename: internal error 1 - please report this bug\n"
    if ($dir eq '/' || $dir eq $ENV{HOME});
# chmod 0700, $dir || die "$::basename: cannot chmod `".quote($dir)."': $!\n";
  chdir $dir || die "$::basename: ".quote($dir).": cannot change to - $!\n";
  opendir(DIR, $::cur) || die "$::basename: ".quote($dir).": cannot list - 
$!\n";
  my @files = readdir(DIR);
  closedir(DIR);
  foreach my $file (@files) {
    next if $file eq $::cur || $file eq $::up;
    if (-d $file && !-l $file) {
      unlink_directory($file);
    } else {
      unlink $file || die "$::basename: ".quote($file).": cannot remove - $!\n";
    }
  }
  chdir $::up || die "$::basename: $::up: cannot change to - $!\n";
  rmdir $dir || die "$::basename: ".quote($dir).": cannot remove - $!\n";
}
====================================================================

Line 1677 reads: unlink $file || die "$::basename: ".quote($file).":
cannot remove - $!\n";

if I change the unlink $file to unlink "./$file" then the error goes
away. The file which is generating the error is named "0" (without
quotes), so perl must has some issue with the statement "unlink 0".

I can't do anymore but this is a workaround for me.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1360259

Title:
  atool fails to convert a 7z archive to zip, terminates with an error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/atool/+bug/1360259/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to