]> git.ipfire.org Git - thirdparty/git.git/blobdiff - compat/mingw.c
Merge branch 'ea/blame-use-oideq'
[thirdparty/git.git] / compat / mingw.c
index 8ee0b6408e945b369b30d9052c91aa7e1f31553a..a00f3312300ac36773bf42aec80b4514f31b1293 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)) {