2008-10-01 [colin] 3.5.0cvs142
authorColin Leroy <colin@colino.net>
Wed, 1 Oct 2008 05:52:21 +0000 (05:52 +0000)
committerColin Leroy <colin@colino.net>
Wed, 1 Oct 2008 05:52:21 +0000 (05:52 +0000)
* src/imap.c
Encode prohibited filenames on win32

ChangeLog
PATCHSETS
configure.ac
src/imap.c

index 592ffd174ebf0a76c299a2393fc5dc3841f3f542..d30d9fe4895309480cc127ba92a52afbfe31fc5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-01 [colin]     3.5.0cvs142
+
+       * src/imap.c
+               Encode prohibited filenames on win32
+
 2008-09-30 [mones]     3.5.0cvs141
 
        * src/ldapctrl.c
 2008-09-30 [mones]     3.5.0cvs141
 
        * src/ldapctrl.c
index 6b54321a17a81a267f9c951aef21cb493b1ffe28..0c84b54f0a7f5172fbb6ada136a68f5fbb959dc6 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.36.2.151 -r 1.36.2.152 src/common/utils.c;  ) > 3.5.0cvs139.patchset
 ( cvs diff -u -r 1.22.2.20 -r 1.22.2.21 src/addrbook.c;  cvs diff -u -r 1.6.10.18 -r 1.6.10.19 src/addrharvest.c;  cvs diff -u -r 1.382.2.480 -r 1.382.2.481 src/compose.c;  cvs diff -u -r 1.18.2.26 -r 1.18.2.27 src/jpilot.c;  cvs diff -u -r 1.79.2.65 -r 1.79.2.66 src/mh.c;  cvs diff -u -r 1.3.2.58 -r 1.3.2.59 src/prefs_themes.c;  cvs diff -u -r 1.47.2.48 -r 1.47.2.49 src/procheader.c;  cvs diff -u -r 1.49.2.117 -r 1.49.2.118 src/procmime.c;  cvs diff -u -r 1.395.2.392 -r 1.395.2.393 src/summaryview.c;  cvs diff -u -r 1.36.2.152 -r 1.36.2.153 src/common/utils.c;  cvs diff -u -r 1.9.2.23 -r 1.9.2.24 src/gtk/sslcertwindow.c;  ) > 3.5.0cvs140.patchset
 ( cvs diff -u -r 1.2.2.16 -r 1.2.2.17 src/ldapctrl.c;  cvs diff -u -r 1.115.2.209 -r 1.115.2.210 src/main.c;  cvs diff -u -r 1.3.2.59 -r 1.3.2.60 src/prefs_themes.c;  cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/printing.c;  ) > 3.5.0cvs141.patchset
 ( cvs diff -u -r 1.36.2.151 -r 1.36.2.152 src/common/utils.c;  ) > 3.5.0cvs139.patchset
 ( cvs diff -u -r 1.22.2.20 -r 1.22.2.21 src/addrbook.c;  cvs diff -u -r 1.6.10.18 -r 1.6.10.19 src/addrharvest.c;  cvs diff -u -r 1.382.2.480 -r 1.382.2.481 src/compose.c;  cvs diff -u -r 1.18.2.26 -r 1.18.2.27 src/jpilot.c;  cvs diff -u -r 1.79.2.65 -r 1.79.2.66 src/mh.c;  cvs diff -u -r 1.3.2.58 -r 1.3.2.59 src/prefs_themes.c;  cvs diff -u -r 1.47.2.48 -r 1.47.2.49 src/procheader.c;  cvs diff -u -r 1.49.2.117 -r 1.49.2.118 src/procmime.c;  cvs diff -u -r 1.395.2.392 -r 1.395.2.393 src/summaryview.c;  cvs diff -u -r 1.36.2.152 -r 1.36.2.153 src/common/utils.c;  cvs diff -u -r 1.9.2.23 -r 1.9.2.24 src/gtk/sslcertwindow.c;  ) > 3.5.0cvs140.patchset
 ( cvs diff -u -r 1.2.2.16 -r 1.2.2.17 src/ldapctrl.c;  cvs diff -u -r 1.115.2.209 -r 1.115.2.210 src/main.c;  cvs diff -u -r 1.3.2.59 -r 1.3.2.60 src/prefs_themes.c;  cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/printing.c;  ) > 3.5.0cvs141.patchset
+( cvs diff -u -r 1.179.2.231 -r 1.179.2.232 src/imap.c;  ) > 3.5.0cvs142.patchset
index bcbb1b99e2efde786b129b0d84aa10302d853be3..97628be48de96a014c49dd6ddda864b616f69bde 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=141
+EXTRA_VERSION=142
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 256cef837ad3bb194d4a3ff7ac21674da61b3b31..6a9245f12cf579a2bbf45083a3520a9f87289a40 100644 (file)
@@ -2490,28 +2490,48 @@ static gchar *imap_folder_get_path(Folder *folder)
 static gchar *imap_item_get_path(Folder *folder, FolderItem *item)
 {
        gchar *folder_path, *path;
 static gchar *imap_item_get_path(Folder *folder, FolderItem *item)
 {
        gchar *folder_path, *path;
-
+       gchar *item_path = NULL;
+       
        g_return_val_if_fail(folder != NULL, NULL);
        g_return_val_if_fail(item != NULL, NULL);
        folder_path = imap_folder_get_path(folder);
 
        g_return_val_if_fail(folder_path != NULL, NULL);
        g_return_val_if_fail(folder != NULL, NULL);
        g_return_val_if_fail(item != NULL, NULL);
        folder_path = imap_folder_get_path(folder);
 
        g_return_val_if_fail(folder_path != NULL, NULL);
+       item_path = g_strdup(item->path);
+
+#ifdef G_OS_WIN32
+       if (strchr(item_path, ':') ||
+           strchr(item_path, '|') ||
+           strchr(item_path, '<') ||
+           strchr(item_path, '>') ||
+           strchr(item_path, '*') ||
+           strchr(item_path, '?') ||
+           strchr(item_path, '#') ||
+           strchr(item_path, ':')
+           ) {
+               g_free(item_path);
+               item_path = g_malloc(strlen(item->path)*3 +1);
+               qp_encode_line(item_path, item->path);
+       }
+#endif 
+
         if (g_path_is_absolute(folder_path)) {
         if (g_path_is_absolute(folder_path)) {
-                if (item->path)
+                if (item_path)
                         path = g_strconcat(folder_path, G_DIR_SEPARATOR_S,
                         path = g_strconcat(folder_path, G_DIR_SEPARATOR_S,
-                                           item->path, NULL);
+                                           item_path, NULL);
                 else
                         path = g_strdup(folder_path);
         } else {
                 else
                         path = g_strdup(folder_path);
         } else {
-                if (item->path)
+                if (item_path)
                         path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
                                            folder_path, G_DIR_SEPARATOR_S,
                         path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
                                            folder_path, G_DIR_SEPARATOR_S,
-                                           item->path, NULL);
+                                           item_path, NULL);
                 else
                         path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
                                            folder_path, NULL);
         }
         g_free(folder_path);
                 else
                         path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
                                            folder_path, NULL);
         }
         g_free(folder_path);
+        g_free(item_path);
 #ifdef G_OS_WIN32
        while (strchr(path, '/'))
                *strchr(path, '/') = '\\';
 #ifdef G_OS_WIN32
        while (strchr(path, '/'))
                *strchr(path, '/') = '\\';