]> git.ipfire.org Git - thirdparty/git.git/blobdiff - compat/mingw.c
Merge branch 'en/ort-perf-batch-9'
[thirdparty/git.git] / compat / mingw.c
index be2b88e76826738884e9c8ce9c77b98b4b9b6a09..a43599841c6c6bb3e4312d53e35647ed0c8af3fb 100644 (file)
@@ -18,8 +18,8 @@ void open_in_gdb(void)
        static struct child_process cp = CHILD_PROCESS_INIT;
        extern char *_pgmptr;
 
-       argv_array_pushl(&cp.args, "mintty", "gdb", NULL);
-       argv_array_pushf(&cp.args, "--pid=%d", getpid());
+       strvec_pushl(&cp.args, "mintty", "gdb", NULL);
+       strvec_pushf(&cp.args, "--pid=%d", getpid());
        cp.clean_on_exit = 1;
        if (start_command(&cp) < 0)
                die_errno("Could not start gdb");
@@ -290,6 +290,9 @@ int mingw_unlink(const char *pathname)
        if (xutftowcs_path(wpathname, pathname) < 0)
                return -1;
 
+       if (DeleteFileW(wpathname))
+               return 0;
+
        /* read-only files cannot be removed */
        _wchmod(wpathname, 0666);
        while ((ret = _wunlink(wpathname)) == -1 && tries < ARRAY_SIZE(delay)) {