diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-05-20 14:24:25 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-05-20 14:24:25 +0400 |
commit | 2f33b79950a24de3307e62aaa678ade9a9c11089 (patch) | |
tree | aa67a5012009ec7f6f3198cead98113f2f375e19 /winsup/cygwin/syscalls.cc | |
parent | c211f8eb243cf08ec269a7ec23bf43f37967341b (diff) |
* syscalls.cc (rename): Fix condition when to start a transaction.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 82f745bb8..aa4819d6d 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1718,7 +1718,8 @@ rename (const char *oldpath, const char *newpath) have to start the transaction here, if necessary. */ if (wincap.has_transactions () && (dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS) - && (dstpc->isdir () || dstpc->has_attribute (FILE_ATTRIBUTE_READONLY))) + && (dstpc->isdir () + || (!removepc && dstpc->has_attribute (FILE_ATTRIBUTE_READONLY)))) start_transaction (old_trans, trans); /* DELETE is required to rename a file. */ |