Commit fef2e9f3 authored by Jan Kara's avatar Jan Kara

udf: Treat symlink component of type 2 as /

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: default avatar"Gábor S." <otnaccess@hotmail.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent d2eb8c35
...@@ -41,10 +41,16 @@ static void udf_pc_to_char(struct super_block *sb, unsigned char *from, ...@@ -41,10 +41,16 @@ static void udf_pc_to_char(struct super_block *sb, unsigned char *from,
pc = (struct pathComponent *)(from + elen); pc = (struct pathComponent *)(from + elen);
switch (pc->componentType) { switch (pc->componentType) {
case 1: case 1:
if (pc->lengthComponentIdent == 0) { /*
p = to; * Symlink points to some place which should be agreed
*p++ = '/'; * upon between originator and receiver of the media. Ignore.
} */
if (pc->lengthComponentIdent > 0)
break;
/* Fall through */
case 2:
p = to;
*p++ = '/';
break; break;
case 3: case 3:
memcpy(p, "../", 3); memcpy(p, "../", 3);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment