1 *** os_win32/os_rename.c.orig 2002/07/12 18:56:55 1.12
2 --- os_win32/os_rename.c 2002/09/25 04:15:41 1.13
8 - char oldbuf[MAX_PATH], newbuf[MAX_PATH];
11 if (DB_GLOBAL(j_rename) != NULL) {
17 * There is no MoveFileEx for Win9x/Me, so we have to
18 ! * do the best we can.
20 - if (!GetLongPathName(oldname, oldbuf, sizeof oldbuf) ||
21 - !GetLongPathName(newname, newbuf, sizeof newbuf)) {
22 - ret = __os_win32_errno();
27 - * If the old and new names differ only in case, we're
30 - if (strcasecmp(oldbuf, newbuf) == 0)
33 (void)DeleteFile(newname);
34 if (!MoveFile(oldname, newname))
35 ret = __os_win32_errno();
39 * There is no MoveFileEx for Win9x/Me, so we have to
40 ! * do the best we can. Note that MoveFile returns 1
41 ! * if the names refer to the same file, so we don't
42 ! * need to check that here.
44 (void)DeleteFile(newname);
45 if (!MoveFile(oldname, newname))
46 ret = __os_win32_errno();