Skip Menu |

This queue is for tickets about the Win32-MSI-HighLevel CPAN distribution.

Report information
The Basics
Id: 49635
Status: resolved
Worked: 3 hours (180 min)
Priority: 0/
Queue: Win32-MSI-HighLevel

People
Owner: grandpa [...] cpan.org
Requestors: rachal [...] cdlsystems.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.0004
Fixed in: (no value)



Subject: Trouble creating a directory with spaces in its name
When attempting to create a directory, it doesn't seem to be possible to specify a target name with a space character in it. For example, the following code results in an error message: $msi->addDirectory( -Directory=>'IconFolder', -Directory_Parent=>'ProgramMenuFolder', -DefaultDir=>'HOMEIN~1|Home Installers Inc:Temp'); Resulting error: Directory information not available. at C:/Perl/site/lib/Win32/MSI/ HighLevel.pm line 4674. The regular expression on line 4670 of HighLevel.pm seems to insist that the target directory be free of whitespace characters. Is this intentional? If so, how should target directories with space characters be created? This bug was found in Win32-MSI-HighLevel-1.0004 running on Windows XP. perl -v returns the following: This is perl, v5.8.8 built for MSWin32-x86-multi-thread
The quick fix is to change /S to [^:] in the regex on line 4670. Spaces ought to be accepted for long names, although there are restrictions on other characters that may be used. The characters: \ ? | > < : / * " may not be used. There are further restrictions on the characters allowed in short file names. An updated version of HighLevel.pm will be uploaded to CPAN in the next few days that fixes the immediate problem, checks file name characters and provides better documentation for the addDirectory method.
Version 1.0005 uploaded to CPAN fixes the spaces in file name issue and performs somewhat more thorough checking of file names.