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 d8cedc76f359b1f5419bdfc1fdf016d8394bbfd0..726b6de6cd65bc095e60059ef7f2c70013a039e2 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 1037ac2ba804b7e7766e67793e2437091f600f28..4c724a9de7c6d5f648be443355112c64871a004e 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 906c90723ee0c5a68ad2ccc33bdb6713269e8293..6e7e243def51555890f4e35852c2b0639f763aea 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 53037af0a213c798faf0eb932f400d9a80ddf3b9..366fb26684ad10b5aa91622bb12d8ed938741fa3 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 6aa24c8557aa3f8a5b3d1f8d668b3b1cfb177bf2..7644b72eb379f8b9c5485a9ed4996e7b1dac38c1 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 0b187ce6b9f6dacd5c92c6b3a8edf41352df1c10..2d97ab6b49c22ed868172ece5ceb0f1804a948a0 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 c98c5e76d664d0c4c9d91791bd3015d04217cd96..9f6901e91894d83afaef81f4354db3c815845905 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 672cb34977e92e8051b39e9a0af61a363489f2ee..620e70a5574a5bb7f58c76674d6f18ce55d23612 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 b31dce542358cac288ac3c55514c1979828e1659..4b11c80e9c3f866417a163b65fa7c1130c6d9fad 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 645a308988c2521f95dae4b17bb9425e2068add4..d367e4b5276e9171a249cc150915b9d76f409fa3 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: