diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/syscalls.cc | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ed681b59e..df44ea262 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,9 @@ 2008-05-20 Corinna Vinschen <corinna@vinschen.de> + * syscalls.cc (rename): Fix condition when to start a transaction. + +2008-05-20 Corinna Vinschen <corinna@vinschen.de> + * path.cc (path_conv::check): Free wide_path and normalized_path if necessary. * path.h (path_conv::path_conv): Set wide_path, normalized_path and 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. */ |