id summary reporter owner description type status milestone component version severity resolution keywords cc 5897 Make path relative function. jmckesson@… Beman Dawes "It is often useful to take a path that is absolute and make it relative to some other path. For example, if you're copying from directory A to directory B using a recursive_directory_iterator, it is often the case that you will do the following: {{{ for_each(bfs::recursive_directory_iterator(directoryA), bfs::recursive_directory_iterator(), [=](const bfs::directory_entry &entry) { if(bfs::is_file(entry.status())) { bfs::path dstPath = directoryB / make_relative(directoryA, entry.path()); bfs::copy_file(entry.path(), dstPath); } }); }}} The `make_relative` function would iterate through the path components of the two arguments, removing entries until it found different ones. Then, it would add "".."" to the beginning of the second path argument, until it ran out of directories in the first path. What you are left with is the second path relative to the first one. Obviously, this would not work if both paths are absolute. But this is such a common operation that there has to be some way to make it work." Feature Requests closed Boost 1.60.0 filesystem Boost 1.47.0 Problem fixed