]> sourceware.org Git - newlib-cygwin.git/commitdiff
* syscalls.cc (rename): ONly start transaction if FS supports them.
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 15 May 2008 17:23:29 +0000 (17:23 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 15 May 2008 17:23:29 +0000 (17:23 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/syscalls.cc

index 4bc83a643445109e7a4852178c605d4eacf72a6a..1d39423a3b913d2cd50c9e0e27f835c6ebc38ed7 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-15  Corinna Vinschen  <corinna@vinschen.de>
+
+       * syscalls.cc (rename): ONly start transaction if FS supports them.
+
 2008-05-15  Corinna Vinschen  <corinna@vinschen.de>
 
        * autoload.cc (LoadDLLfuncNt): Re-invent.
index af3d0ad17b975b0fd01eda04ac05bf2361d8ec4a..4f35b6b69e0abdc0f514aa4d686a85e4796d8317 100644 (file)
@@ -1716,6 +1716,7 @@ rename (const char *oldpath, const char *newpath)
      to call only NtSetInformationFile under the transaction.  Therefore we
      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)))
     start_transaction (old_trans, trans);
 
@@ -1829,7 +1830,9 @@ rename (const char *oldpath, const char *newpath)
      destination before renaming. */
   if (status == STATUS_ACCESS_DENIED && dstpc->exists () && !dstpc->isdir ())
     {
-      if (wincap.has_transactions () && !trans)
+      if (wincap.has_transactions ()
+         && (dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS)
+         && !trans)
        {
          start_transaction (old_trans, trans);
          /* As mentioned earlier, opening the file must be part of the
This page took 0.032761 seconds and 5 git commands to generate.