Skip Menu |

This queue is for tickets about the File-HomeDir CPAN distribution.

Report information
The Basics
Id: 34606
Status: resolved
Priority: 0/
Queue: File-HomeDir

People
Owner: Nobody in particular
Requestors: JDB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: File::HomeDir::Windows should use Win32::GetFolderPath()
File::HomeDir should use Win32::GetFolderPath() to locate special folders instead of poking around in the registry. Some folders are also only created on first use, so they don't exist in the registry until they have been created. Win32::GetFolderPath() supports an optional second argument to create these special folders if they don't yet exist. You should require Win32 0.29 or later to get a version that is robust with non-ANSI usernames when running with older Perl versions (old Perl versions destroy the Unicode environment, which is used by the shell functions to determine the location of the APPDATA directory). See also: http://blogs.msdn.com/oldnewthing/archive/2003/11/03/55532.aspx
Subject: Re: [rt.cpan.org #34606] File::HomeDir::Windows should use Win32::GetFolderPath()
Date: Wed, 02 Apr 2008 11:56:29 +1100
To: bug-File-HomeDir [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
Jan Dubois via RT wrote: Show quoted text
> Tue Apr 01 20:56:26 2008: Request 34606 was acted upon. > Transaction: Ticket created by JDB > Queue: File-HomeDir > Subject: File::HomeDir::Windows should use Win32::GetFolderPath() > Broken in: (no value) > Severity: Normal > Owner: Nobody > Requestors: JDB@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=34606 > > > > File::HomeDir should use Win32::GetFolderPath() to locate special > folders instead of poking around in the registry. Some folders are also > only created on first use, so they don't exist in the registry until > they have been created. Win32::GetFolderPath() supports an optional > second argument to create these special folders if they don't yet exist. > > You should require Win32 0.29 or later to get a version that is robust > with non-ANSI usernames when running with older Perl versions (old Perl > versions destroy the Unicode environment, which is used by the shell > functions to determine the location of the APPDATA directory). > > See also: http://blogs.msdn.com/oldnewthing/archive/2003/11/03/55532.aspx >
Thanks for this Jan. I'll take a look at porting it during the Oslo hackfest next week. Adam K
File::HomeDir::Windows has now been ported over to your recommended method. Resolved.