Opened 11 years ago

Closed 10 years ago

Last modified 10 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


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/

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

Attachments (0)

Change History (3)

comment:1 Changed 10 years ago by anonymous

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

Applied, thanks

comment:2 Changed 10 years ago by anonymous

Resolution: fixed
Status: assignedclosed

comment:3 Changed 10 years ago by Álvaro Iradier

(In [3885]) Closed #2169

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain anonymous.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.