cygwin: unlink: simplify rootdir handling
In try_to_bin, rootdir is NULL for remote drives anyway. No extra check required. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
5224eb7517
commit
9ac4c0325f
|
@ -394,7 +394,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags)
|
||||||
/* Shoot. */
|
/* Shoot. */
|
||||||
pfri = (PFILE_RENAME_INFORMATION) infobuf;
|
pfri = (PFILE_RENAME_INFORMATION) infobuf;
|
||||||
pfri->ReplaceIfExists = TRUE;
|
pfri->ReplaceIfExists = TRUE;
|
||||||
pfri->RootDirectory = pc.isremote () ? NULL : rootdir;
|
pfri->RootDirectory = rootdir;
|
||||||
pfri->FileNameLength = recycler.Length;
|
pfri->FileNameLength = recycler.Length;
|
||||||
memcpy (pfri->FileName, recycler.Buffer, recycler.Length);
|
memcpy (pfri->FileName, recycler.Buffer, recycler.Length);
|
||||||
frisiz = sizeof *pfri + pfri->FileNameLength - sizeof (WCHAR);
|
frisiz = sizeof *pfri + pfri->FileNameLength - sizeof (WCHAR);
|
||||||
|
|
Loading…
Reference in New Issue