Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pike pike
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 104
    • Issues 104
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pikelang
  • pikepike
  • Issues
  • #3935
Closed
Open
Issue created Jun 05, 2005 by Peter Bortas@zinoOwner

Filesystem.Traversion doesn't check if directory listing succeeded

Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3935

Reported by Adam Montague, Sirius Hosting amontague@siriushosting.com

If you create a Filesystem.Traversion object for a directory that contains a directory that you do not have permissions to list (execute), then you get a non-obvious and lengthy error message. I think its assuming that listing of directories succeeds, instead of either skipping directories with no permission to list, or throwing an exception. Here's the error I get if I foreach a Filesystem.Travsion(".") object when I don't have permission to list the ./models directory:

Bad argument 1 to sizeof().
/usr/local/lib/pike/modules/Filesystem.pmod/module.pmod:287:
    /${PIKE_MODULE_PATH}/Filesystem.pmod/module.Traversion()->create("./
models",0)
/usr/local/lib/pike/modules/Filesystem.pmod/module.pmod:226:
    /${PIKE_MODULE_PATH}/Filesystem.pmod/module->Traversion()

/usr/local/lib/pike/modules/Filesystem.pmod/module.pmod:301:
    /${PIKE_MODULE_PATH}/Filesystem.pmod/module.Traversion()->set_current()

/usr/local/lib/pike/modules/Filesystem.pmod/module.pmod:324:
    /${PIKE_MODULE_PATH}/Filesystem.pmod/module.Traversion()->add(1)

/usr/local/lib/pike/modules/Filesystem.pmod/module.pmod:329:
    /${PIKE_MODULE_PATH}/Filesystem.pmod/module.Traversion()->`+=(1)
Assignee
Assign to
Time tracking