Modify

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#2169 closed defect (fixed)

Plugin throws if non-directories exist in trac environment root

Reported by: JasonWinnebeck Owned by: anonymous
Priority: normal Component: SearchAllPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

Plugin fails if non-directories exist in trac environment root, below is a patch to ensure that the file isn't a directory before trying to open it as a environment. Not included in this patch as I didn't need it would be to also catch an exception from the open environment command, because even if it is a directory it's possible that it is not a Trac environment.

  • tracsearchall/searchall.py

     
    5252            # skip our own project
    5353            if project == this_project:
    5454                continue
    55 
     55
    5656            # make up URL for project
    5757            project_url = '/'.join( (base_url, project) )
    5858
    5959            project_path = os.path.join(search_path,project)
     60            if not os.path.isdir( project_path ):
     61                continue
     62
    6063            env = open_environment(project_path)

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by anonymous

  • Owner changed from airadier to anonymous
  • Status changed from new to assigned

Applied, thanks

comment:2 Changed 6 years ago by anonymous

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:3 Changed 6 years ago by airadier

(In [3885]) Closed #2169

Add Comment

Modify Ticket

Action
as closed The owner will remain anonymous.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.