T T wrote:
The problem was to create a directory path with all intermediate ones if they don't exist. lfs.mkdir cannot create a hierarchy.
Ah, I see. I any case, I have applied your patch already, exactly as-is. I'll think about a unix solution.
Once I started coding this, I realized it's not so simple in general, because one needs to resolve the path first, get rid of all the '..' and '.' etc. GetFullPathName call is very handy for this, so I thought it would be nice to access it. Too bad that there is no reliable equivalent on Unix.
For now I ended up with 'cmd.exe /c mkdir "some\dir\hierarchy\to\create"' :->. I'm not very proud of this solution but it gets the job done for this particular problem.
Cheers,
Tomek
PS. Perhaps Unix's realpath is not the best match for what GetFullPathName does. With GetFullPathName the resolved path does not have to exist.