diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ed681b59e..df44ea262 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2008-05-20 Corinna Vinschen + + * syscalls.cc (rename): Fix condition when to start a transaction. + 2008-05-20 Corinna Vinschen * path.cc (path_conv::check): Free wide_path and normalized_path if 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. */