]> git.ipfire.org Git - thirdparty/git.git/blobdiff - compat/mingw.c
strmap: enable allocations to come from a mem_pool
[thirdparty/git.git] / compat / mingw.c
index 4454b3e67b7488be2701fdc0001aa608362fd002..a00f3312300ac36773bf42aec80b4514f31b1293 100644 (file)
@@ -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)) {