Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2013-11-27 18:30:36 +0400
committerCorinna Vinschen <corinna@vinschen.de>2013-11-27 18:30:36 +0400
commit1aaa128794acee5e7cc55df72d8a7cc87676eec4 (patch)
treec6bc3969aee154a0b41327d7ab59bddc0c079fcb
parent854ed5f03a4d92990a512ef43665bb137d9f0f46 (diff)
* syscalls.cc (try_to_bin): Drop fh_dup, reuse tmp_fh instead.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/syscalls.cc5
2 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f41deeb2f..90b121e93 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
2013-11-27 Corinna Vinschen <corinna@vinschen.de>
+ * syscalls.cc (try_to_bin): Drop fh_dup, reuse tmp_fh instead.
+
+2013-11-27 Corinna Vinschen <corinna@vinschen.de>
+
* syscalls.cc (try_to_bin): Take additional parameter to get file open
flags. If the file to move to the bin has been opened casesensitive,
reopen it caseinsensitive. Explain why. Revert the default name of
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 243fd8642..c5e8c42df 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -280,17 +280,16 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags)
the recycler directory name, too. */
if (!pc.objcaseinsensitive ())
{
- HANDLE fh_dup;
InitializeObjectAttributes (&attr, &ro_u_empty, OBJ_CASE_INSENSITIVE,
fh, NULL);
- status = NtOpenFile (&fh_dup, access, &attr, &io, FILE_SHARE_VALID_FLAGS,
+ status = NtOpenFile (&tmp_fh, access, &attr, &io, FILE_SHARE_VALID_FLAGS,
flags);
if (!NT_SUCCESS (status))
debug_printf ("NtOpenFile (reopen) failed, status = %y", status);
else
{
NtClose (fh);
- fh = fh_dup;
+ fh = tmp_fh;
}
}
/* Initialize recycler path. */