Hi:
Some people have written in regarding a problem with the create_website =
command in the oi_manage batch program on Win32 systems. After hunting =
around a bit I think I have located the problem. At line 30 of =
PackageRepository.pm there is a subroutine called "package_filename," =
which in turn calls the method "catfile" in the "File::Spec" module. =
The "File::Spec" module is designed to handle OS-specific filesystem =
semantics, and the "catfile" method concatenates the arguments passed to =
it in an OS-correct way. The subroutine "package_filename" in =
PackageRepository.pm calls the "catfile" method with "/" as the first =
arg (I'm assuming to specify root on *nix machines). This causes an =
error when prepended in a Windows environment (i.e., it comes out as =
"/c:\path\to\OI\base\dir"). As a quick fix I replaced the line in =
PackageRepository.pm with a Windows-appropriate one. My code looks like =
this:
#sub package_filename { return File::Spec->catfile( '/', $_[1], =
$PKG_DB_FILE ) } # original code
sub package_filename { return File::Spec->catfile($_[1], $PKG_DB_FILE ) =
} # new code without forward slash
A more robust fix in PackageRepository.pm might be to check if the base =
directory specified begins with "/" or "c:\" and prepend appropriately =
(or better yet have File::Spec figure this out itself).
Hope this helps,
Dave Reed |