* syscalls.cc (rename): Use unchanged path_conv in condition.

This commit is contained in:
Corinna Vinschen 2007-08-01 07:52:35 +00:00
parent 44587e392d
commit 2bee37bcae
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2007-08-01 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (rename): Use unchanged path_conv in condition.
2007-08-01 Corinna Vinschen <corinna@vinschen.de>
* smallprint.cc (__small_vsprintf): Add format specifier 'W' for

View File

@ -1478,13 +1478,13 @@ rename (const char *oldpath, const char *newpath)
{
new2pc.check (newpath, PC_SYM_NOFOLLOW, stat_suffixes);
newpc.get_nt_native_path ()->Length -= 4 * sizeof (WCHAR);
if (newpc.is_binary () || newpc.is_lnk_symlink ())
if (new2pc.is_binary () || new2pc.is_lnk_symlink ())
removepc = &new2pc;
}
}
}
dstpc = (removepc == &newpc) ? &new2pc : &newpc;
/* DELETE is required to rename a file. */
status = NtOpenFile (&fh, DELETE, oldpc.get_object_attr (attr, sec_none_nih),
&io, FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);