Bug fixes

This commit is contained in:
Leeland Heins 2019-03-07 07:35:41 -06:00 committed by GitHub
parent 072537e88e
commit 0d5c97548e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -2027,7 +2027,7 @@ sub delete_file {
# Subdirectory Header.
my @subdirblks = ();
push @subdirblks, $key_pointer;
my $subdirblk = $key_pointer
my $subdirblk = $key_pointer;
my $done = 0;
while (!$done) {
my ($prv_vol_dir_blk, $nxt_vol_dir_blk, $storage_type_name_length, $subdir_name, $creation_ymd, $creation_hm, $version, $min_version, $access, $entry_length, $entries_per_block, $file_count, $parent_pointer, $parent_entry, $parent_entry_length, @subfiles) = get_subdir_hdr($pofile, $subdirblk, 1, $debug);
@ -2035,10 +2035,10 @@ sub delete_file {
$done = 1;
} else {
push @subdirblks, $nxt_vol_dir_blk;
$dirblk = $nxt_vol_dir_blk;
$subdirblk = $nxt_vol_dir_blk;
}
}
$rv = release_blocks($pofile, \@subdirbks, $debug);
$rv = release_blocks($pofile, \@subdirblks, $debug);
} elsif ($file_storage_type == 0xf0) {
# Volume directory Header. This should never happen.
printf("Can't delete volume directory header \$%02x\n", $header_pointer);
@ -2203,12 +2203,12 @@ sub create_subdir {
print "pofile=$pofile subdirname=$subdirname\n" if $debug;
my $subdir = '';
my $apple_fname = $apple_filename;
if ($apple_filename =~ /^[\/]*([^\/]+)\/(\S+)$/) {
my $subdir_fname = $subdirname;
if ($subdirname =~ /^[\/]*([^\/]+)\/(\S+)$/) {
$subdir = $1;
$apple_fname = $2;
$subdir_fname = $2;
}
print "subdir=$subdir apple_fname=$apple_fname\n";
print "subdir=$subdir subdir_fname=$subdir_fname\n";
# Find an empty file descriptive entry in the proper subdirectory.
my ($header_pointer, $i) = find_empty_fdescent($pofile, $subdir, $debug);