Modify

Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#2169 closed defect (fixed)

Plugin throws if non-directories exist in trac environment root

Reported by: Jason Winnebeck 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 16 years ago by anonymous

Owner: changed from Álvaro Iradier to anonymous
Status: newassigned

Applied, thanks

comment:2 Changed 16 years ago by anonymous

Resolution: fixed
Status: assignedclosed

comment:3 Changed 16 years ago by Álvaro Iradier

(In [3885]) Closed #2169

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anonymous.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.