--- a/lib/folder.py Thu Jan 31 17:28:02 2008 +0000
+++ b/lib/folder.py Thu Jan 31 17:58:03 2008 +0000
@@ -38,7 +38,7 @@
class Folder (object) :
def __init__ (self, name='.', parent=None) :
# the directory name, no trailing /
- self.name = name.rstrip(os.sep)
+ self.name = unicode(name.rstrip(os.sep))
# our parent Folder, or None
self.parent = parent
@@ -122,9 +122,10 @@
and (self.parent or fname not in settings.ROOT_IGNORE)
) :
index.debug("Found subdir %s", fpath)
- f = self.subdirs[fname] = Folder(fname, self)
+ f = Folder(fname, self)
if f.index(next_filter) : # recursion
# if a subdir is alive, we are alive as well
+ self.subdirs[fname] = f
self.alive = True
# handle images
@@ -166,7 +167,7 @@
self.title, self.descr = utils.readTitleDescr(title_path)
# default title for the root dir
- if self.title :
+ if self.title or self.descr :
self.alive = True
pass # use what was in the title file
@@ -176,8 +177,8 @@
else :
self.title = self.name
- if self.descr :
- self.alive = True
+ if not self.alive :
+ index.debug("Dir %s isn't alive" % self.path)
return self.alive