Skip to content

Commit

Permalink
udf: Treat symlink component of type 2 as /
Browse files Browse the repository at this point in the history
Currently, we ignore symlink component of type 2. But mkisofs and other OS'
seem to treat it as / so do the same for compatibility.

Reported-by: "Gábor S." <otnaccess@hotmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Jan Kara committed Jan 9, 2012
1 parent d2eb8c3 commit fef2e9f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions fs/udf/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ static void udf_pc_to_char(struct super_block *sb, unsigned char *from,
pc = (struct pathComponent *)(from + elen);
switch (pc->componentType) {
case 1:
if (pc->lengthComponentIdent == 0) {
p = to;
*p++ = '/';
}
/*
* Symlink points to some place which should be agreed
* upon between originator and receiver of the media. Ignore.
*/
if (pc->lengthComponentIdent > 0)
break;
/* Fall through */
case 2:
p = to;
*p++ = '/';
break;
case 3:
memcpy(p, "../", 3);
Expand Down

0 comments on commit fef2e9f

Please sign in to comment.