tracker r2403 - trunk/src/tracker-extract
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2403 - trunk/src/tracker-extract
- Date: Tue, 21 Oct 2008 12:40:41 +0000 (UTC)
Author: pvanhoof
Date: Tue Oct 21 12:40:41 2008
New Revision: 2403
URL: http://svn.gnome.org/viewvc/tracker?rev=2403&view=rev
Log:
* src/tracker-extract/tracker-albumart.c: Some minor optimizations
Modified:
trunk/src/tracker-extract/tracker-albumart.c
Modified: trunk/src/tracker-extract/tracker-albumart.c
==============================================================================
--- trunk/src/tracker-extract/tracker-albumart.c (original)
+++ trunk/src/tracker-extract/tracker-albumart.c Tue Oct 21 12:40:41 2008
@@ -23,6 +23,9 @@
#include <glib.h>
#include <glib/gprintf.h>
#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
#include <gio/gio.h>
@@ -87,11 +90,11 @@
if (dir) {
gchar *target = NULL;
GFile *file2 = NULL;
+ struct stat bf;
- for (filen = g_dir_read_name (dir); filen; filen = g_dir_read_name (dir))
- count++;
+ stat (dirp, &bf);
- g_dir_rewind (dir);
+ count = bf.st_nlink;
if ((trackcnt != -1 && trackcnt < count + 3 && trackcnt > count - 3) || (trackcnt == -1 && count > 8 && count < 50)) {
gchar * found = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]