Skip to content
Tcl Source Code View Ticket
Login

View Ticket

file attrs fails on zipfs path directories

Closed / Fixed4af110a6a12a0c177fb245a7c21be584103b7cffCreated 3 years agoUpdated 3 years ago
Descriptionmarkdown2023-09-25 14:45:39

Example:

% zipfs mount ../tests/zipfiles/test.zip /a/b/c
% file attributes //zipfs:/
-longname //zipfs:/ -shortname //zipfs:/
% file attributes //zipfs:/a
could not read "//zipfs:/a": no such file or directory
% file attributes //zipfs:/a/b/c
-uncompsize 0 -compsize 0 -offset 0 -mount //zipfs:/a/b/c -archive /mnt/d/src/tcltk/wip/tcl/tests/zipfiles/test.zip -permissions 0o555 -crc 0

The first two above seem wrong.

In the first case, the -longname and -shortname should apply to native files only. They make no sense for the zipfs mount. On Unix, the command raises an error which does not make sense for an existing directory.

Likewise, the second command should not raise an error for an existing directory.

Seems to be the correct behaviour should be to return an empty attribute dictionary. The zipfs-specific attributes as in the last command do not apply since there is no single archive associated with //zipfs:/ or //zipfs:/a. They are part of the mount path, not the archive and there can be more than one archive mounted below.

Referenced by3
apnadkarnimarkdown2023-10-02 07:04:24

Fixed in [735e596737].

Log in (anonymous is fine) to add a comment.