Ticket #3537: isofs fix: do not skip all .dotfiles

There is a simple bug in iso9660 helper:

    if (name ~ /^\.\.?/) next

means "skip all lines which start with one or two dots".
Author probably meant:

    if (name ~ /^\.\.?$/) next

I propose to not be cryptic and just check both possibilities separately.

The below trivial patch was tested to work: now I see
the file named ".dot" in a test iso file.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
Denys Vlasenko 2015-10-18 20:06:48 +02:00 committed by Andrew Borodin
parent 2540595b0f
commit 6d48c59efb

View File

@ -156,7 +156,8 @@ BEGIN {
if (SEMICOLON = "YES") sub(";1$", "", name);
## sub(";[0-9]+$", "", name) ## would break copyout
# skip . and ..
if (name ~ /^\.\.?/) next;
if (name == ".") next;
if (name == "..") next;
printf "%s%s%s\n", attr, dir, name
}'
}