Author: abrander
Date: 2010-01-28 19:02:49 +0100 (Thu, 28 Jan 2010)
New Revision: 3110

Modified:
   branches/rawstudio-ng-color/src/rs-store.c
Log:
Only call rs_normalize_path() once per directory load.

Modified: branches/rawstudio-ng-color/src/rs-store.c
===================================================================
--- branches/rawstudio-ng-color/src/rs-store.c  2010-01-28 17:48:34 UTC (rev 
3109)
+++ branches/rawstudio-ng-color/src/rs-store.c  2010-01-28 18:02:49 UTC (rev 
3110)
@@ -1073,19 +1073,19 @@
        GDir *dir;
        gint count = 0;
 
-       rs_library_restore_tags(path);
+       gchar *path_normalized = rs_normalize_path(path);
 
-       dir = g_dir_open(path, 0, NULL); /* FIXME: check errors */
+       rs_library_restore_tags(path_normalized);
 
+       dir = g_dir_open(path_normalized, 0, NULL); /* FIXME: check errors */
+
        while((dir != NULL) && (name = g_dir_read_name(dir)))
        {
                /* Ignore "hidden" files and directories */
                if (name[0] == '.')
                        continue;
 
-               gchar *temp = g_build_filename(path, name, NULL);
-               fullname = rs_normalize_path(temp);
-               g_free(temp);
+               fullname = g_build_filename(path, name, NULL);
 
                if (rs_filetype_can_load(fullname))
                {
@@ -1098,6 +1098,7 @@
                g_free(fullname);
        }
 
+       g_free(path_normalized);
        if (dir)
                g_dir_close(dir);
 


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to