Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76556 - trunk/boost/filesystem/v3
From: bdawes_at_[hidden]
Date: 2012-01-17 11:00:23


Author: bemandawes
Date: 2012-01-17 11:00:22 EST (Tue, 17 Jan 2012)
New Revision: 76556
URL: http://svn.boost.org/trac/boost/changeset/76556

Log:
Apply recursive_directory_iterator patch contributed by Daniel Aarno, fixing #5652 for cyclic symlinks
Text files modified:
   trunk/boost/filesystem/v3/operations.hpp | 7 ++++---
   1 files changed, 4 insertions(+), 3 deletions(-)

Modified: trunk/boost/filesystem/v3/operations.hpp
==============================================================================
--- trunk/boost/filesystem/v3/operations.hpp (original)
+++ trunk/boost/filesystem/v3/operations.hpp 2012-01-17 11:00:22 EST (Tue, 17 Jan 2012)
@@ -765,9 +765,10 @@
     {
       if ((m_options & symlink_option::_detail_no_push) == symlink_option::_detail_no_push)
         m_options &= ~symlink_option::_detail_no_push;
- else if (is_directory(m_stack.top()->status())
- && (!is_symlink(m_stack.top()->symlink_status())
- || (m_options & symlink_option::recurse) == symlink_option::recurse))
+ // patch for following else if contributed by Daniel Aarno, fixing #5652 for cyclic symlinks
+ else if (((m_options & symlink_option::recurse) == symlink_option::recurse
+ || !is_symlink(m_stack.top()->symlink_status()))
+ && is_directory(m_stack.top()->status()))
       {
         if (ec == 0)
           m_stack.push(directory_iterator(m_stack.top()->path()));


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk