Bug fix: Directory name mapping to ISO level 1 was too liberal if

iso_write_opts_set_allow_dir_id_ext() was enabled.
This commit is contained in:
Thomas Schmitt 2012-03-13 09:38:29 +01:00
parent 269e0b19a5
commit ce35aefb32
2 changed files with 6 additions and 4 deletions

View File

@ -94,7 +94,7 @@ needs_transl:;
} else if (img->max_37_char_filenames) {
isoname = iso_r_fileid(ascii_name, 36, relaxed, force_dots);
} else if (img->iso_level == 1) {
if (relaxed || !force_dots) {
if (relaxed) {
if (strchr(ascii_name, '.') == NULL)
max_len = 8;
else
@ -102,7 +102,7 @@ needs_transl:;
isoname = iso_r_fileid(ascii_name, max_len, relaxed,
force_dots);
} else {
isoname = iso_1_fileid(ascii_name);
isoname = iso_1_fileid(ascii_name, force_dots);
}
} else {
if (relaxed || !force_dots) {

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2007 Vreixo Formoso
* Copyright (c) 2009 Thomas Schmitt
* Copyright (c) 2009 - 2012 Thomas Schmitt
*
* This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2
@ -124,8 +124,10 @@ char *iso_r_dirid(const char *src, int size, int relaxed);
*
* @param src
* The identifier, in ASCII encoding.
* @param force_dots
* If 1 then prepend empty extension by SEPARATOR1 = '.'
*/
char *iso_1_fileid(const char *src);
char *iso_1_fileid(const char *src, int force_dots);
/**
* Create a level 2 file identifier.