Tk Library Source Code

View Ticket
Login
Ticket UUID: 3147481
Title: find error on hidden, unreadable directory in Windows
Type: Bug Version: None
Submitter: guardus Created on: 2010-12-29 08:34:20
Subsystem: fileutil Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2013-01-09 07:18:32
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2013-01-09 00:18:32
Description:
I am using ActiveTcl 8.5.9.1 on Windows XP SP3.

  fileutil::find $env(SYSTEMDRIVE)/ {string match *.pdf}
  couldn't read directory "C:/System Volume Information/*": permission denied
      while executing
  "glob -nocomplain -directory $current -types f          -- *"
      (procedure "GLOBF" line 8)
      invoked from within
  "GLOBF $current"
      (procedure "find" line 48)
      invoked from within
  "find $env(SYSTEMDRIVE)/ {string match *.pdf}"
      (file "./error.tcl" line 6)

Maybe "glob -nocomplain" should not error out, but for now I added a check to
make sure the directory is readable in GLOBF and GLOBD as a workaround.
My workaround, along with my workaround for bug 3141568, looks like this:

    proc ::fileutil::GLOBF {current} {
        if {![file readable $current]} {
            return {}
        }
        if {([file type $current] eq {link}) && !([file exists [file readlink $current]] && [file readable [file readlink $current]])} {
            return {}
        }
User Comments: andreas_kupries added on 2013-01-09 07:18:32:

allow_comments - 1

Committed revision [91efe94a91] . Bumped to version 1.14.5.