2009-05-05 [colin] 3.7.1cvs51
[claws.git] / src / common / utils.c
index 03b74dc48576bc7ae845917209c2bbb0c2d51839..52860ec04344709165e5e0d020bf72710b9c2a53 100644 (file)
@@ -504,7 +504,7 @@ gint file_strip_crs(const gchar *file)
                goto unlinkout;
        }
        
-       if (rename_force(out, file) < 0)
+       if (move_file(out, file, TRUE) < 0)
                goto unlinkout;
        
        g_free(out);
@@ -3286,18 +3286,25 @@ static gint execute_sync(gchar *const argv[])
 
        cm_return_val_if_fail(argv != NULL && argv[0] != NULL, -1);
 
+#ifdef G_OS_UNIX
        if (g_spawn_sync(NULL, (gchar **)argv, NULL, G_SPAWN_SEARCH_PATH,
                         NULL, NULL, NULL, NULL, &status, NULL) == FALSE) {
                g_warning("Couldn't execute command: %s\n", argv[0]);
                return -1;
        }
 
-#ifdef G_OS_UNIX
        if (WIFEXITED(status))
                return WEXITSTATUS(status);
        else
                return -1;
 #else
+       if (g_spawn_sync(NULL, (gchar **)argv, NULL, G_SPAWN_SEARCH_PATH| 
+                        G_SPAWN_CHILD_INHERITS_STDIN|G_SPAWN_LEAVE_DESCRIPTORS_OPEN,
+                        NULL, NULL, NULL, NULL, &status, NULL) == FALSE) {
+               g_warning("Couldn't execute command: %s\n", argv[0]);
+               return -1;
+       }
+
        return status;
 #endif
 }
@@ -3778,6 +3785,7 @@ int subject_get_prefix_length(const gchar *subject)
                                return len+1;
                        else
                                return len;
+               }
        }
        return 0;
 #endif