aboutsummaryrefslogtreecommitdiffstats
path: root/scanner/TreeWalker.py
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2011-05-09 17:49:09 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2011-05-09 17:49:09 -0400
commitddba74b57cde8e13e40f358437383f43bd1b5e6d (patch)
tree0e8481f11eec8e279dadcd33a0203513b02c969b /scanner/TreeWalker.py
parentUpdate google tracker for url scheme change. (diff)
downloadPhotoFloat-ddba74b57cde8e13e40f358437383f43bd1b5e6d.tar.xz
PhotoFloat-ddba74b57cde8e13e40f358437383f43bd1b5e6d.zip
Skip dot files. Fix key error.
Diffstat (limited to '')
-rw-r--r--scanner/TreeWalker.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scanner/TreeWalker.py b/scanner/TreeWalker.py
index 872b830..691900a 100644
--- a/scanner/TreeWalker.py
+++ b/scanner/TreeWalker.py
@@ -32,6 +32,8 @@ class TreeWalker:
if not cached:
album = Album(path)
for entry in os.listdir(path):
+ if entry[0] == '.':
+ continue
entry = os.path.join(path, entry)
if os.path.isdir(entry):
album.add_album(self.walk(entry))
@@ -39,7 +41,7 @@ class TreeWalker:
cache_hit = False
if cached_album:
cached_photo = cached_album.photo_from_path(entry)
- if cached_photo and file_mtime(entry) <= cached_photo.attributes["DateTimeFile"]:
+ if cached_photo and file_mtime(entry) <= cached_photo.attributes["dateTimeFile"]:
print "Photo cache hit %s" % entry
cache_hit = True
photo = cached_photo