|Title:||tclvfs module vfs::zip discards the leading dot of files stored in an ZIP archive|
|Last Modified:||2022-05-10 17:09:30|
|Version Found In:||1.0.4|
anonymous added on 2022-05-09 17:04:57:
tclvfs module vfs::zip discards the leading dot of files stored in an ZIP archive:
open via vfs::zip
As you can see, '.foo' became 'foo' in vfs::zip
But the ZIP really holds '.foo', not 'foo'
This is due to the following code in
which looks suspiciously like someone was trying to strip off the "./" prefix sequence from names like "./foo"
Cleary stripping off the dot from the beginning of a file name is plain wrong.
anonymous added on 2022-05-10 17:09:30:
The line of code you highlighted is plain wrong as pointed out. It gives the following results:
% string trimleft "/.hello" "./" hello
% string trimleft "../../../../hello" "./" hello
I would ask that the proposed fix handles these cases correctly.