TiddlyWiki.org

Changeset 4996

Show
Ignore:
Timestamp:
16/05/08 16:57:20 (2 months ago)
Author:
cdent
Message:

tiddlyweb - only handle extensions on resource names when it is the
resource itself that has the extension. Sometimes the extension will
be on something else, such as the collection name.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Trunk/contributors/ChrisDent/experimental/TiddlyWeb/tiddlyweb/web/__init__.py

    r4089 r4996  
    3434    extension = environ.get('tiddlyweb.extension') 
    3535    if extension: 
    36         resource_name = resource_name[0 : resource_name.rfind('.' + extension)] 
     36        try: 
     37            resource_name = resource_name[0 : resource_name.rindex('.' + extension)] 
     38        except ValueError: 
     39            pass 
    3740 
    3841    return resource_name