Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4fe854ae2ad0c745d8e150e9d654f992b108edb9b8bb7da21c8990ee2ad394cc
Ticket: 4ae42446ab6ae605bbe5aaf5cb5905b499ce9794
overlaid zipfs mounts co-mingle directory contents
User & Date: apnadkarni on 2023-09-10 04:01:30
Changes

  1. icomment:
    @griffin, @juliannoble2, noted. What gives me pause is that the current behavior seems to be purely accidental as a result of a single "flat" hash table being used to store paths.
    
    - When an overlay has conflicts with the existing mounts, the existing mounts win (i.e. if you mount a.zip and b.zip both containing file X in that order, the a.zip's X is preserved). This seems slightly counterintuitive to me but in any case the comment in the code ["This should not happen"](https://core.tcl-lang.org/tcl/file?ci=d46e5f18434976e3&name=generic/tclZipfs.c&ln=1759) which skips b.zip's version implies it was not by design. Any time, I see code that "should not be reached" is reached, it is a point of worry!
    
    - More important, I would expect that when one of the archives is unmounted, the full contents of the other one that is still mounted are seen. This is not the case as the common entries are simply removed from the hash table. Looking at the code, it **seems** to me non-trivial re-implementation will be needed to fix this, something that I would be hesitant to introduce for this release. Maybe if @chw's directory caching implementation is picked up, this can be fixed as well.
    
    Perhaps this issue is a corner case not sufficiently important to address at this point in time.
    
  2. login: "apnadkarni"
  3. mimetype: "text/x-markdown"