Lars Gullik Bjønnes wrote: > Hmm... perhaps you'd like to see my old fs:: patch...
I don't think that I deserve to as I was the one raising all those objections to it at the time. Actually, I'm concentrating on the graphics loader stuff entirely because these classes require an explicit absolute path to the files. All the issues I raised about absolute,relative and even kpathsea-visible files are not relevant here. > I have no idea if it works anymore, or what its actual state is. > But it might be ok for reference. > > ... no... I deleted all of htat... oh well... It'll be in the mail archive. I'll go looking. > | I don't know why the function was written this way, rather than > | being passed 'to_file' directly. However, if we retain this > | signature, we are faced with the problem of how to write the > | fs::path equivalent: >> > | fs::path const to_file_base("/foo/bar"); > | std::string const tail(".eps"); > | fs::path to_file = to_file_base + tail; // compile > | failure. > > fs::path to_file(to_file_base.string() + ".eps", fs::nocheck); > perhaps. Nasty though isn't it? I think that branch_path() and leaf() is the safe way to go. -- Angus