2008-12-12 [paul] 3.6.1cvs71
authorPaul Mangan <paul@claws-mail.org>
Fri, 12 Dec 2008 10:38:32 +0000 (10:38 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 12 Dec 2008 10:38:32 +0000 (10:38 +0000)
* src/imap.c
* src/mh.c
* src/partial_download.c
* src/textview.c
* src/common/claws.c
* src/common/prefs.c
* src/common/utils.c
win32: fix unlinking, renaming and bug with
non-ascii username

ChangeLog
PATCHSETS
configure.ac
src/common/claws.c
src/common/prefs.c
src/common/utils.c
src/imap.c
src/mh.c
src/partial_download.c
src/textview.c

index d8cedc7..726b6de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-12-12 [paul]      3.6.1cvs71
+
+       * src/imap.c
+       * src/mh.c
+       * src/partial_download.c
+       * src/textview.c
+       * src/common/claws.c
+       * src/common/prefs.c
+       * src/common/utils.c
+               win32: fix unlinking, renaming and bug with
+               non-ascii username
+
 2008-12-11 [colin]     3.6.1cvs70
 
        * po/fr.po
index 1037ac2..4c724a9 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/plugins/pgpcore/pgp_viewer.c;  ) > 3.6.1cvs68.patchset
 ( cvs diff -u -r 1.1.2.17 -r 1.1.2.18 manual/faq.xml;  ) > 3.6.1cvs69.patchset
 ( cvs diff -u -r 1.42.2.44 -r 1.42.2.45 po/fr.po;  cvs diff -u -r 1.1.2.18 -r 1.1.2.19 manual/fr/advanced.xml;  ) > 3.6.1cvs70.patchset
+( cvs diff -u -r 1.179.2.237 -r 1.179.2.238 src/imap.c;  cvs diff -u -r 1.79.2.66 -r 1.79.2.67 src/mh.c;  cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/partial_download.c;  cvs diff -u -r 1.96.2.211 -r 1.96.2.212 src/textview.c;  cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/common/claws.c;  cvs diff -u -r 1.5.2.12 -r 1.5.2.13 src/common/prefs.c;  cvs diff -u -r 1.36.2.155 -r 1.36.2.156 src/common/utils.c;  ) > 3.6.1cvs71.patchset
index 906c907..6e7e243 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=6
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=70
+EXTRA_VERSION=71
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 53037af..366fb26 100644 (file)
@@ -110,7 +110,7 @@ gboolean claws_init(int *argc, char ***argv)
 
        /* backup if old rc file exists */
        if (is_file_exist(RC_DIR)) {
-               if (rename(RC_DIR, RC_DIR ".bak") < 0) {
+               if (g_rename(RC_DIR, RC_DIR ".bak") < 0) {
                        FILE_OP_ERROR(RC_DIR, "rename");
                        return FALSE;
                }
index 6aa24c8..7644b72 100644 (file)
@@ -175,7 +175,7 @@ gint prefs_file_close(PrefFile *pfile)
 #ifdef G_OS_WIN32
                 claws_unlink(bakpath);
 #endif
-               if (rename(path, bakpath) < 0) {
+               if (g_rename(path, bakpath) < 0) {
                        FILE_OP_ERROR(path, "rename");
                        claws_unlink(tmppath);
                        g_free(path);
@@ -188,7 +188,7 @@ gint prefs_file_close(PrefFile *pfile)
 #ifdef G_OS_WIN32
         claws_unlink(path);
 #endif
-       if (rename(tmppath, path) < 0) {
+       if (g_rename(tmppath, path) < 0) {
                FILE_OP_ERROR(tmppath, "rename");
                claws_unlink(tmppath);
                g_free(path);
index 0b187ce..2d97ab6 100644 (file)
@@ -1732,7 +1732,7 @@ w32_shgetfolderpath (HWND a, int b, HANDLE c, DWORD d, LPSTR e)
          handle = dlopen (dllnames[i], RTLD_LAZY);
          if (handle)
            {
-             func = dlsym (handle, "SHGetFolderPathA");
+             func = dlsym (handle, "SHGetFolderPathW");
              if (!func)
                {
                  dlclose (handle);
@@ -1793,15 +1793,16 @@ const gchar *get_locale_dir(void)
 const gchar *get_home_dir(void)
 {
 #ifdef G_OS_WIN32
-       static char home_dir[MAX_PATH] = "";
-
-       if (home_dir[0] == '\0') {
+       static char home_dir_utf16[MAX_PATH] = "";
+       static gchar *home_dir_utf8 = NULL;
+       if (home_dir_utf16[0] == '\0') {
                if (w32_shgetfolderpath
                            (NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE,
-                            NULL, 0, home_dir) < 0)
-                               strcpy (home_dir, "C:\\Sylpheed");
+                            NULL, 0, home_dir_utf16) < 0)
+                               strcpy (home_dir_utf16, "C:\\Sylpheed");
+               home_dir_utf8 = g_utf16_to_utf8 ((const gunichar *)home_dir_utf16, -1, NULL, NULL, NULL);
        }
-       return home_dir;
+       return home_dir_utf8;
 #else
        static const gchar *homeenv = NULL;
 
index c98c5e7..9f6901e 100644 (file)
@@ -2790,7 +2790,7 @@ static gint imap_rename_folder(Folder *folder, FolderItem *item,
 
        if (is_dir_exist(old_cache_dir)) {
                new_cache_dir = folder_item_get_path(item);
-               if (rename(old_cache_dir, new_cache_dir) < 0) {
+               if (g_rename(old_cache_dir, new_cache_dir) < 0) {
                        FILE_OP_ERROR(old_cache_dir, "rename");
                }
                g_free(new_cache_dir);
index 672cb34..620e70a 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -826,7 +826,7 @@ static gchar *mh_item_get_path(Folder *folder, FolderItem *item)
        if (!is_dir_exist(real_path) && is_dir_exist(path)) {
                /* mmh, older version did put utf8 filenames instead of
                 * the correct encoding */
-               rename(path, real_path);
+               g_rename(path, real_path);
                folder_item_scan(item);
        }
 
index b31dce5..4b11c80 100644 (file)
@@ -318,7 +318,7 @@ static int partial_uidl_mark_mail(MsgInfo *msginfo, int download)
 
        fclose(fp);
        claws_unlink(filename);
-       rename(pathnew, filename);
+       g_rename(pathnew, filename);
        g_free(pathnew);
        msginfo->planned_download = download;
        msgcache_update_msg(msginfo->folder->cache, msginfo);
index 645a308..d367e4b 100644 (file)
@@ -1038,14 +1038,14 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
                        if (textview->stop_loading) {
                                fclose(tmpfp);
                                waitpid(pid, pfd, 0);
-                               unlink(fname);
+                               g_unlink(fname);
                                return;
                        }
                }
 
                fclose(tmpfp);
                waitpid(pid, pfd, 0);
-               unlink(fname);
+               g_unlink(fname);
 #endif
        } else {
 textview_default: