perl - Using -d to check if dir exists fails sometimes -
-d $dir or make_path( $dir) or die "can't mkdir $dir: $!"; i have line of code, less 1% of time script fails saying:
mkdir <$dir path>: file exists @ script.pl line 234 anything wrong way used "-d" , "or" ?
it sounds trying create directory same name existing (plain) file. -d returns false since target not directory. make_path dies since can't create requested directory.
Comments
Post a Comment