Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 680

Show
Ignore:
Timestamp:
09/25/05 18:43:31
Author:
fumanchu
Message:

Closes #324 (wontfix). Added more extensive comment regarding relative paths for cptools.serveFile.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/lib/cptools.py

    r679 r680  
    226226     
    227227    # If path is relative, make absolute using cherrypy.root's module. 
     228    # If there is no cherrypy.root, or it doesn't have a __module__ 
     229    # attribute, then users should fix the issue by making path absolute. 
     230    # That is, CherryPy should not guess where the application root is 
     231    # any further than trying cherrypy.root.__module__, and it certainly 
     232    # should *not* use cwd (since CP may be invoked from a variety of 
     233    # paths). If using staticFilter, you can make your relative paths 
     234    # become absolute by supplying a value for "staticFilter.root". 
    228235    if not os.path.isabs(path): 
    229236        root = os.path.dirname(sys.modules[cherrypy.root.__module__].__file__) 

Hosted by WebFaction

Log in as guest/cpguest to create tickets