* syscalls.cc (rename): Fix condition when to start a transaction.

This commit is contained in:
Corinna Vinschen 2008-05-20 10:24:25 +00:00
parent c211f8eb24
commit 2f33b79950
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
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

View File

@ -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. */