From 9ac4c0325fba621cdb5bf503b2521b4edd35086f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 18 Oct 2017 16:15:08 +0200 Subject: [PATCH] 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 --- winsup/cygwin/syscalls.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 8ff50c850..96fb6f39f 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -394,7 +394,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) /* Shoot. */ pfri = (PFILE_RENAME_INFORMATION) infobuf; pfri->ReplaceIfExists = TRUE; - pfri->RootDirectory = pc.isremote () ? NULL : rootdir; + pfri->RootDirectory = rootdir; pfri->FileNameLength = recycler.Length; memcpy (pfri->FileName, recycler.Buffer, recycler.Length); frisiz = sizeof *pfri + pfri->FileNameLength - sizeof (WCHAR);