diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-05-20 10:24:25 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-05-20 10:24:25 +0000 |
commit | 2f33b79950a24de3307e62aaa678ade9a9c11089 (patch) | |
tree | aa67a5012009ec7f6f3198cead98113f2f375e19 /winsup | |
parent | c211f8eb243cf08ec269a7ec23bf43f37967341b (diff) | |
download | cygnal-2f33b79950a24de3307e62aaa678ade9a9c11089.tar.gz cygnal-2f33b79950a24de3307e62aaa678ade9a9c11089.tar.bz2 cygnal-2f33b79950a24de3307e62aaa678ade9a9c11089.zip |
* syscalls.cc (rename): Fix condition when to start a transaction.
Diffstat (limited to 'winsup')
-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. */ |