summaryrefslogtreecommitdiff
path: root/compat/mingw.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/mingw.c')
-rw-r--r--compat/mingw.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 8ee0b6408e..a00f331230 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -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)) {