Author: akv
Date: 2010-01-27 23:26:54 +0100 (Wed, 27 Jan 2010)
New Revision: 3099
Modified:
branches/rawstudio-ng-color/librawstudio/rs-utils.c
branches/rawstudio-ng-color/librawstudio/rs-utils.h
Log:
Added rs_normalize_path() to normalize a path - this needs a case for WIN32.
Modified: branches/rawstudio-ng-color/librawstudio/rs-utils.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-utils.c 2010-01-27 21:59:31 UTC
(rev 3098)
+++ branches/rawstudio-ng-color/librawstudio/rs-utils.c 2010-01-27 22:26:54 UTC
(rev 3099)
@@ -27,6 +27,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
+#include <stdlib.h>
#define DOTDIR ".rawstudio"
@@ -673,3 +674,10 @@
ret = g_strdup_printf("%.0f-%.0fmm", min, max);
return ret;
}
+
+const gchar *
+rs_normalize_path(const gchar *path)
+{
+ char temp [PATH_MAX+1];
+ return realpath(path, temp);
+}
Modified: branches/rawstudio-ng-color/librawstudio/rs-utils.h
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-utils.h 2010-01-27 21:59:31 UTC
(rev 3098)
+++ branches/rawstudio-ng-color/librawstudio/rs-utils.h 2010-01-27 22:26:54 UTC
(rev 3099)
@@ -165,5 +165,6 @@
const gchar * rs_human_aperture(gdouble aperture);
const gchar * rs_human_focal(gdouble min, gdouble max);
+const gchar * rs_normalize_path(const gchar *path);
#endif /* RS_UTILS_H */
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit