Eh, no! If you want to play the perfectionism game you should try to be perfect ;-)What if both p1 and p2 are NULL? Then you should also consider that "C:foo" is a valid path on Windows, too ;-)
Replacing every backslash by a slash before the other actions should solve everything, right? It seems to work fine.
Joost