patch of Application.py module: ---- findDirectoryIndex as in Webware 0.8.1 ---- # Handle directories if debug: print '>> directory = %s' % repr(ssPath) for dirFilename in self.setting('DirectoryFile'): filenames = self.filenamesForBaseName(os.path.join(ssPath, dirFilename)) num = len(filenames) if num==1: break # we found a file to handle the directory elif num>1: print 'WARNING: the directory is %s which contains more than 1 directory file: %s' % (ssPath, filenames) return None if num==0: if debug: print 'WARNING: For %s, the directory contains no directory file.' % (ssPath) return None ssPath = filenames[0] # our path now includes the filename within the directory if debug: print '>> discovered directory file = %s' % repr(ssPath) return ssPath ---- findDirectoryIndex improved version ---- # Handle directories if debug: print '>> directory = %s' % repr(ssPath) for dirFilename in self.setting('DirectoryFile'): basename = os.path.join(ssPath, dirFilename) filenames = self.filenamesForBaseName(basename) num = len(filenames) if num>1: if self.setting('UseCascadingExtensions'): for ext in self.setting('ExtensionCascadeOrder'): if (basename + ext) in filenames: filenames = [basename + ext] num = 1 break if num==1: break # we found a file to handle the directory if num>1: print 'WARNING: the directory is %s which contains more than 1 directory file: %s' % (ssPath, filenames) return None if num==0: if debug: print 'WARNING: For %s, the directory contains no directory file.' % (ssPath) return None ssPath = filenames[0] # our path now includes the filename within the directory if debug: print '>> discovered directory file = %s' % repr(ssPath) return ssPath ----