Skip to content

Commit

Permalink
handling of alias now functional
Browse files Browse the repository at this point in the history
  • Loading branch information
ksrodarmer committed Jun 13, 2016
1 parent a9124e2 commit 2d7621c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions test/kar/old-kar
9 changes: 6 additions & 3 deletions tools/kar/kar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ void kar_alias_link_type ( BSTNode *node, void *data )
/* establish root for search */
dir = entry -> parentDir;
if ( dir == NULL )
dir = ( const KARDir * ) data;
dir = root;
e = & dir -> dad;

/* walk the path */
Expand Down Expand Up @@ -1506,7 +1506,8 @@ void kar_alias_link_type ( BSTNode *node, void *data )
else
{
e = & e -> parentDir -> dad;
assert ( e != NULL );
if ( e == NULL )
e = & root -> dad;
}
}
else
Expand Down Expand Up @@ -1823,7 +1824,7 @@ rc_t extract_dir ( const KARDir *src, const extract_block *eb )
static
rc_t extract_alias ( const KARAlias *src, const extract_block *eb )
{
return KDirectoryCreateAlias ( eb -> cdir, 0700, kcmCreate, src -> link, src -> dad . name );
return KDirectoryCreateAlias ( eb -> cdir, 0777, kcmCreate, src -> link, src -> dad . name );
}

static
Expand Down Expand Up @@ -1943,6 +1944,8 @@ rc_t kar_test_extract ( const Params *p )
BSTreeDoUntil ( tree, false, kar_extract, &eb );
rc = eb . rc;
}

KDirectoryRelease ( eb . cdir );
}
}
}
Expand Down

0 comments on commit 2d7621c

Please sign in to comment.