Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 96b576e23d1198aa93d7721bb76c8e58f885b3cf8b8db5b43fe627c36f2a58ed
Ticket: eeab90542804319c07ed3775926ad9791cf859ca
file glob semantics - support efficient retrieval - reduce round trips
User & Date: juliannoble2 on 2023-08-20 16:32:25
Changes

  1. icomment:
    Further related.
    On both unix and windows if you have a subfolder with restricted permissions then a glob using join ( or */* etc) produces inconsistent results
    
    % glob -dir . -join * test.txt
    ./plainfolder/test.txt ./link_to_plainfolder/test.txt ./stuff/test.txt
    % glob -dir . -join * *.txt
    couldn't read directory "/usr/local/etc/ansible/foldertest/restricted/": permission denied
    % glob -dir . -join * *
    couldn't read directory "/usr/local/etc/ansible/foldertest/restricted/": permission denied
    
    Arguably the the restricted folder should either cause this glob to emit an error in all cases or none.
    
    Perhaps this decision was a design decision regarding the integrity of what is returned - ie better to error out than return incomplete results.
    
    If there is any merit in my above suggestion of a return dict for glob - then it may make sense to ignore inaccessible intermediate folders like this and return only what can be reached - and accumulate errors in a dict returnable key such as -errorpaths
    
  2. login: "juliannoble2"
  3. mimetype: "text/plain"