Inspired by TortoiseSVN revs. 28243, 28244 and 28245. Signed-off-by: Sven Strickroth <email@cs-ware.de>