talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 726ed3de38dd103179a1d860c2f81dba1a2f829a
parent ee15052fff7c3394e0121c3b523d4691708a6ab1
Author: Colin Leroy <colin@colino.net>
Date:   Sat,  1 Dec 2012 21:23:10 +0000

2012-12-01 [colin]	3.9.0cvs35

	* src/common/utils.c
		As usual, Windows is a little bit different
		(you have to love it the same as the normal OSes...)

Diffstat:
MChangeLog | 6++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/common/utils.c | 18++++++++++++++++++
4 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,9 @@ +2012-12-01 [colin] 3.9.0cvs35 + + * src/common/utils.c + As usual, Windows is a little bit different + (you have to love it the same as the normal OSes...) + 2012-12-01 [colin] 3.9.0cvs34 * src/common/utils.c diff --git a/PATCHSETS b/PATCHSETS @@ -4532,3 +4532,4 @@ ( cvs diff -u -r 1.274.2.361 -r 1.274.2.362 src/mainwindow.c; cvs diff -u -r 1.39.2.67 -r 1.39.2.68 src/mainwindow.h; cvs diff -u -r 1.395.2.459 -r 1.395.2.460 src/summaryview.c; cvs diff -u -r 1.43.2.134 -r 1.43.2.135 src/toolbar.c; ) > 3.9.0cvs32.patchset ( cvs diff -u -r 1.13.2.47 -r 1.13.2.48 src/common/plugin.c; ) > 3.9.0cvs33.patchset ( cvs diff -u -r 1.36.2.209 -r 1.36.2.210 src/common/utils.c; cvs diff -u -r 1.20.2.83 -r 1.20.2.84 src/common/utils.h; ) > 3.9.0cvs34.patchset +( cvs diff -u -r 1.36.2.210 -r 1.36.2.211 src/common/utils.c; ) > 3.9.0cvs35.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=9 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=34 +EXTRA_VERSION=35 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/common/utils.c b/src/common/utils.c @@ -5359,7 +5359,19 @@ static gchar *canonical_list_to_file(GSList *list) GSList *cur; gchar *str; +#ifndef G_OS_WIN32 result = g_string_append(result, G_DIR_SEPARATOR_S); +#else + if (pathlist->data) { + const gchar *root = (gchar *)pathlist->data; + if (root[0] != '\0' && g_ascii_isalpha(root[0]) && + root[1] == ':') { + /* drive - don't prepend dir separator */ + } else { + result = g_string_append(result, G_DIR_SEPARATOR_S); + } + } +#endif for (cur = pathlist; cur; cur = cur->next) { result = g_string_append(result, (gchar *)cur->data); @@ -5383,7 +5395,11 @@ static GSList *cm_split_path(const gchar *filename, int depth) gboolean follow_symlinks = TRUE; if (depth > 32) { +#ifndef G_OS_WIN32 errno = ELOOP; +#else + errno = EINVAL; /* can't happen, no symlink handling */ +#endif return NULL; } @@ -5429,6 +5445,7 @@ static GSList *cm_split_path(const gchar *filename, int depth) return NULL; } } +#ifndef G_OS_WIN32 if (follow_symlinks && g_file_test(tmp_path, G_FILE_TEST_IS_SYMLINK)) { GError *error = NULL; gchar *target = g_file_read_link(tmp_path, &error); @@ -5446,6 +5463,7 @@ static GSList *cm_split_path(const gchar *filename, int depth) } g_free(target); } +#endif g_free(tmp_path); } }