Commit 35ae06b
mingw: support renaming symlinks
Older MSVCRT's `_wrename()` function cannot rename symlinks over
existing files: it returns success without doing anything. Newer
MSVCR*.dll versions probably do not share this problem: according to CRT
sources, they just call `MoveFileEx()` with the `MOVEFILE_COPY_ALLOWED`
flag.
Avoid the `_wrename()` call, and go with directly calling
`MoveFileEx()`, with proper error handling of course.
Signed-off-by: Karsten Blees <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 90cd9a1 commit 35ae06b
1 file changed
+16
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2275 | 2275 | | |
2276 | 2276 | | |
2277 | 2277 | | |
2278 | | - | |
| 2278 | + | |
2279 | 2279 | | |
2280 | 2280 | | |
2281 | 2281 | | |
| |||
2286 | 2286 | | |
2287 | 2287 | | |
2288 | 2288 | | |
2289 | | - | |
2290 | | - | |
2291 | | - | |
2292 | | - | |
2293 | | - | |
2294 | | - | |
2295 | | - | |
2296 | | - | |
2297 | | - | |
2298 | 2289 | | |
2299 | 2290 | | |
2300 | 2291 | | |
| |||
2370 | 2361 | | |
2371 | 2362 | | |
2372 | 2363 | | |
2373 | | - | |
| 2364 | + | |
| 2365 | + | |
2374 | 2366 | | |
2375 | 2367 | | |
2376 | 2368 | | |
2377 | 2369 | | |
2378 | | - | |
2379 | | - | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
2380 | 2380 | | |
2381 | 2381 | | |
2382 | 2382 | | |
| |||
2388 | 2388 | | |
2389 | 2389 | | |
2390 | 2390 | | |
2391 | | - | |
2392 | | - | |
2393 | | - | |
2394 | | - | |
2395 | | - | |
2396 | | - | |
2397 | | - | |
| 2391 | + | |
| 2392 | + | |
2398 | 2393 | | |
2399 | | - | |
2400 | | - | |
| 2394 | + | |
2401 | 2395 | | |
2402 | 2396 | | |
2403 | 2397 | | |
| |||
0 commit comments