The function therefore tries to (with my configuration at least) create the directory /d:, which maps to C:\D:. Since colons are not allowed in file and directory names for Windows filesystems, the
mkdir() call fails.
I'm not sure what to suggest, however. Since /d:/fotobilder is a perfectly valid path (even if it is a little silly) on a UNIX system, it can't just check to see if the first bit looks vaugely like a Windows drive letter. I can take the drive letter out of my
$PIC_ROOT, but then it'll create on C: which is where my Apache install lives, and while I have my D: drive mapped to a directory on my C: drive, that's not true for many people and so shouldn't be relied on.
I have no solution to offer: I merely present the problem.
Update: If you set FBHOME (or just
$PIC_ROOT) to a path which does not begin with a driver letter but instead is relative to the root of drive Apache runs from, it can work with one minor modification which should not break UNIX. In
make_dirs, just after the start of the
foreach loop, add the statment
next unless $_;. If you don't add this, the code will try to create a directory called /fotobilder (or whatever it's called) in the root directory — that is, a directory name with a slash in it, whose path is //fotobilder — and fail because a directory name cannot contain a slash. This new conditional at the start of the loop makes the code skip out 'empty' directory names, which aren't valid on UNIX either but the
mkdir function there cheats and ignores them.