bug-xorriso
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

?????? [report] [bug] libisofs cant omit ";1" with "omit_version_off" se


From: ????/wx????
Subject: ?????? [report] [bug] libisofs cant omit ";1" with "omit_version_off" set, and windows marked ";1" as "_1" with file name.
Date: Fri, 20 Nov 2020 22:14:45 +0800

Hi,
: )
that's my pleasure

also, i would share my set in step2:
 1. which parmeters i used:
       rockrand on
       joliet on
       -compliance omit_version_off
2. which type i used:
      DVD+R

3. and modified the libisofs to set 'omit_version_number = 0 ' to make below codes passed, maybe this not right , but just want to test :(
void write_one_dir_record
{
  ...
    if(node->type == JOLIET_FILE && !(t->opts->omit_version_number &3))
    {
       len_dr +=4;
rec->file_id[len_fi++] = 0;
rec->file_id[len_fi++] = ';';
rec->file_id[len_fi++] = 0;
rec->file_id[len_fi++] = '1';
    }
....
}

4. any way, this time is sleeping time for me ,so i can't get more logs for, but i got so pleasure that you found the root cause.

BR,      
                          MAX.lv

------------------ ???????? ------------------
??????: "Thomas Schmitt" <scdbackup@gmx.net>;
????????: 2020??11??20??(??????) ????9:57
??????: "bug-xorriso"<bug-xorriso@gnu.org>;
????: "????/wx????"<mfreesky@qq.com>;
????: Re: [report] [bug] libisofs cant omit ";1" with "omit_version_off" set, and windows marked ";1" as "_1" with file name.

Hi,

i think i now know what is happening. libisofs does not strip ";1" from
Joliet names if -ecma119_map is set to "stripped". So the ";1" make it
into the Rock Ridge and Joliet names.
When the names with ";1" get written to Joliet, the ";1" gets mapped to
"_1" and, if -compliance is set to only_iso_version_off, a new ";1" is
added. This adding probably happens in MS-Windows, too.

This problem was hidden since ~ 12 years by the default setting of xorriso
to not append ";1" to Joliet, and by the fact that appending sessions to a
MS-Windows-made disc seems not to have been tested ever.

So my thanks go to mfreesky@qq.com for reporting this.


The documentation says the -ecma119_map is applicable only if neither
Rock Ridge nor Joliet is used. So i have to define a new read option for
Joliet and a xorriso command to set it.
The default will be to strip ";1" from Joliet names when they get read.

This might last a few days. I will give you a note when a new GNU xorriso
development tarball is ready for testing.

------------------------------------------------------------------------

If you feel able to make a small code change in GNU xorriso, then download

  https://www.gnu.org/software/xorriso/xorriso-1.5.3.tar.gz

to a directory of your choice. Go there and do

  tar xzf xorriso-1.5.3.tar.gz
  cd xorriso-1.5.3
  ./configure --prefix=/usr
  make

Check whether you got a working xorriso

  ./xorriso/xorriso -version

and then change in line 1962 of libisofs/fs_image.c the setting of
                ecma119_map = 0;
to
                ecma119_map = 1;

As diff:
-----------------------------------------------------------------------
--- a/libisofs/fs_image.c 2020-10-31 13:59:57.219546146 +0100
+++ b/libisofs/fs_image.c 2020-11-20 14:00:20.690070878 +0100
@@ -1962,7 +1962,7 @@ invalid_zf:
             len = strlen(name);
             ecma119_map = fsdata->ecma119_map;
             if (fsdata->iso_root_block == fsdata->svd_root_block)
-                ecma119_map = 0;
+                ecma119_map = 1;
             if (ecma119_map >= 1 && ecma119_map <= 3 &&
                 len > 2 && name[len-2] == ';' && name[len-1] == '1') {
                 if (len > 3 && name[len-3] == '.') {
-----------------------------------------------------------------------
Then do again:

  make

Try whether

  ./xorriso/xorriso -read_fs norock -indev /dev/sr0 -lsl / --

stops displaying trailing ";1".

Add a file test4_1.txt to the disc preventing Rock Ridge production

  ./xorriso/xorriso \
      -read_fs norock \
      -dev /dev/sr0 \
      -compliance only_iso_version_off \
      -rockridge off \
      -joliet on \
      -map test4_1.txt /test4_1.txt

and then verify that the old file names did not get converted their ";1"
to a further layer of "_1". Further no ";1" should be displaid:

  ./xorriso/xorriso -read_fs norock -indev /dev/sr0 -lsl / --

If all works well, consider to remove the installed xorriso package and
to do in the xorriso-1.5.3 directory:

  sudo make install

If you later upgrade your xorriso package from a operating system
repository, do first in the xorriso-1.5.3 directory:

  sudo make uninstall


The existing surplus "_1" will remain on that disc i fear. You may rename
the files during a xorriso session, though.

  xorriso \
    ...
    -dev /dev/sr0 \
    ...
    -mv /step1_1.txt_1 /step1_1.txt \
    -mv /step1_2.txt_1 /step1_2.txt \
    -mv /Step1_1.txt_1 /step1_1.txt \
    -mv /Step1_2.txt_1 /Step1_2.txt \
    ...


Have a nice day :)

Thomas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]