[tracker] albumart: Ignore . and .. in directory count
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker] albumart: Ignore . and .. in directory count
- Date: Tue, 12 May 2009 06:06:08 -0400 (EDT)
commit 15866e9fbddea0c85a2a364edb2cc8aa656d1acb
Author: Jürg Billeter <j bitron ch>
Date: Tue May 12 12:04:43 2009 +0200
albumart: Ignore . and .. in directory count
---
src/libtracker-common/tracker-albumart.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/libtracker-common/tracker-albumart.c b/src/libtracker-common/tracker-albumart.c
index 71af61d..669c722 100644
--- a/src/libtracker-common/tracker-albumart.c
+++ b/src/libtracker-common/tracker-albumart.c
@@ -441,7 +441,8 @@ tracker_albumart_heuristic (const gchar *artist_,
file = NULL;
g_stat (dirname, &st);
- count = st.st_nlink;
+ /* do not count . and .. */
+ count = st.st_nlink - 2;
if (tracks_str) {
tracks = atoi (tracks_str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]