Skip Menu |

This queue is for tickets about the Cache-Cache CPAN distribution.

Report information
The Basics
Id: 13674
Status: resolved
Priority: 0/
Queue: Cache-Cache

People
Owner: Nobody in particular
Requestors: info [...] whawes.co.uk
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.04
Fixed in: (no value)



Subject: Bug in Cache::FileBackend 1.27 on Win32
Cache::FileBackend 1.27 does not pass a drive letter to File::Temp::tempfile(). This is not a problem on a Unix based system, but on a Win32 system causes Cache::FileCache to die: "Error in tempfile() using \temp\FileCache\Default\9\2\4\XXXXXXXXXX: Parent directory (\temp\FileCache\Default\9\2\4\) is not a directory at C:/Perl/site/lib/Cache/FileBackend.pm line 563" The attached patch corrects this behaviour, prepending the directory path with a drive letter if one is present or an empty string if not. I have verified this fix on Windows 2003 with ActivePerl 5.8.7 and Windows 2000 with ActivePerl 5.8.4.
--- FileBackend_orig.pm Wed Jul 13 14:53:41 2005 +++ FileBackend.pm Wed Jul 13 14:55:50 2005 @@ -559,7 +559,8 @@ my ( $volume, $directory, $filename ) = File::Spec->splitpath( $p_path ); - my ( $temp_fh, $temp_filename ) = tempfile( DIR => $directory ); + $volume ||= ''; + my ( $temp_fh, $temp_filename ) = tempfile( DIR => $volume . $directory ); binmode( $temp_fh );
I have a fixed that I'm checking in for the 1.05 release. It is slightly different than the one you suggested, but only insofar as I wanted to be consistent with some other similar code. Feel free to check out the CVS version if it is urgent. And I'd love to hear confirmation if the fix worked. Thanks@
[DCLINTON - Wed Jul 13 18:29:46 2005]: Show quoted text
> I have a fixed that I'm checking in for the 1.05 release. It is > slightly different than the one you suggested, but only insofar as I > wanted to be consistent with some other similar code. > > Feel free to check out the CVS version if it is urgent. And I'd love > to > hear confirmation if the fix worked. Thanks@ >
So is that 1.05 release ever going to be made available out of CVS?
From: johanl ÄT darserman.com
Show quoted text
> So is that 1.05 release ever going to be made available out of CVS?
Yes, please, please, please, make a release with this fix! Please? /J
From: aaronw6 [...] gmail.com
On Wed Jul 13 10:21:18 2005, guest wrote: Show quoted text
> Cache::FileBackend 1.27 does not pass a drive letter to > File::Temp::tempfile(). This is not a problem on a Unix based > system, but on a Win32 system causes Cache::FileCache to die: > > "Error in tempfile() using \temp\FileCache\Default\9\2\4\XXXXXXXXXX: > Parent directory (\temp\FileCache\Default\9\2\4\) is not a > directory at C:/Perl/site/lib/Cache/FileBackend.pm line 563" > > The attached patch corrects this behaviour, prepending the directory > path with a drive letter if one is present or an empty string if > not. I have verified this fix on Windows 2003 with ActivePerl
5.8.7 Show quoted text
> and Windows 2000 with ActivePerl 5.8.4.
The above attached fix worked great, When is the fix going to be put in the PM, or at least state that there is a problem for win32 systems.