From 7ac5b75748b4a9edd37a05d426506655bd6e796a Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 7 Sep 2015 13:17:08 +0200 Subject: [PATCH] Bug fix: Names read from Joliet tree where stripped of trailing ";1" --- libisofs/fs_image.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libisofs/fs_image.c b/libisofs/fs_image.c index f429fd8..a10affe 100644 --- a/libisofs/fs_image.c +++ b/libisofs/fs_image.c @@ -1415,7 +1415,7 @@ int iso_file_source_new_ifs(IsoImageFilesystem *fs, IsoFileSource *parent, struct ecma119_dir_record *record, IsoFileSource **src, int flag) { - int ret; + int ret, ecma119_map; struct stat atts; time_t recorded; _ImageFsData *fsdata; @@ -1934,7 +1934,10 @@ if (name != NULL && !namecont) { /* remove trailing version number */ len = strlen(name); - if (fsdata->ecma119_map >= 1 && fsdata->ecma119_map <= 3 && + ecma119_map = fsdata->ecma119_map; + if (fsdata->iso_root_block == fsdata->svd_root_block) + ecma119_map = 0; + if (ecma119_map >= 1 && ecma119_map <= 3 && len > 2 && name[len-2] == ';' && name[len-1] == '1') { if (len > 3 && name[len-3] == '.') { /* @@ -1947,9 +1950,9 @@ if (name != NULL && !namecont) { } } - if (fsdata->ecma119_map == 2 || fsdata->ecma119_map == 3) { + if (ecma119_map == 2 || ecma119_map == 3) { for (cpt = name; *cpt != 0; cpt++) { - if (fsdata->ecma119_map == 2) { + if (ecma119_map == 2) { if (islower(*cpt)) *cpt = toupper(*cpt); } else {