So I guessed I missed the boat on this one, but I was having a similar issue even after I found code that theoretically should work. The issue is the boost::filesystem::path data type takes the last char off of a string.
I was reading from a file and my path was "c:\one\two\three". But when i made it a path data type, the string was changed to "c:\one\two\thre". No idea what that is, but due to this the file location wasn't found and blah blah blah. What i did to fix it was just add another '\' to the end. That way it removes the '\' instead of the 'e'.
worked just fine after that. But as stated before, I have no idea why it did this. Hope this helps someone.