diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1560,10 +1560,11 @@ sys_rename (const char * oldname, const char * newname) | |||
| 1560 | seems to make the second rename work properly. */ | 1560 | seems to make the second rename work properly. */ |
| 1561 | sprintf (p, ".%s.%u", o, i); | 1561 | sprintf (p, ".%s.%u", o, i); |
| 1562 | i++; | 1562 | i++; |
| 1563 | result = rename (oldname, temp); | ||
| 1563 | } | 1564 | } |
| 1564 | /* This loop must surely terminate! */ | 1565 | /* This loop must surely terminate! */ |
| 1565 | while (rename (oldname, temp) < 0 && errno == EEXIST); | 1566 | while (result < 0 && errno == EEXIST); |
| 1566 | if (errno != EEXIST) | 1567 | if (result < 0) |
| 1567 | return -1; | 1568 | return -1; |
| 1568 | } | 1569 | } |
| 1569 | 1570 | ||