D 2023-08-20T16:32:25.424
J icomment Further\srelated.\r\nOn\sboth\sunix\sand\swindows\sif\syou\shave\sa\ssubfolder\swith\srestricted\spermissions\sthen\sa\sglob\susing\sjoin\s(\sor\s*/*\setc)\sproduces\sinconsistent\sresults\r\n\r\n%\sglob\s-dir\s.\s-join\s*\stest.txt\r\n./plainfolder/test.txt\s./link_to_plainfolder/test.txt\s./stuff/test.txt\r\n%\sglob\s-dir\s.\s-join\s*\s*.txt\r\ncouldn't\sread\sdirectory\s"/usr/local/etc/ansible/foldertest/restricted/":\spermission\sdenied\r\n%\sglob\s-dir\s.\s-join\s*\s*\r\ncouldn't\sread\sdirectory\s"/usr/local/etc/ansible/foldertest/restricted/":\spermission\sdenied\r\n\r\nArguably\sthe\sthe\srestricted\sfolder\sshould\seither\scause\sthis\sglob\sto\semit\san\serror\sin\sall\scases\sor\snone.\r\n\r\nPerhaps\sthis\sdecision\swas\sa\sdesign\sdecision\sregarding\sthe\sintegrity\sof\swhat\sis\sreturned\s-\sie\sbetter\sto\serror\sout\sthan\sreturn\sincomplete\sresults.\r\n\r\nIf\sthere\sis\sany\smerit\sin\smy\sabove\ssuggestion\sof\sa\sreturn\sdict\sfor\sglob\s-\sthen\sit\smay\smake\ssense\sto\signore\sinaccessible\sintermediate\sfolders\slike\sthis\sand\sreturn\sonly\swhat\scan\sbe\sreached\s-\sand\saccumulate\serrors\sin\sa\sdict\sreturnable\skey\ssuch\sas\s-errorpaths
J login juliannoble2
J mimetype text/plain
K eeab90542804319c07ed3775926ad9791cf859ca
U juliannoble2
Z d4eb89fe74378218c3fbeb1c86cf2dcb