[Jifty-commit] r2670 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Jan 27 13:11:26 EST 2007
Author: agentz
Date: Sat Jan 27 13:11:26 2007
New Revision: 2670
Modified:
jifty/trunk/lib/Jifty/Util.pm
Log:
Jifty::Util - fixed the broken Win32 logic:
- use ExtUtils::MM before calling MM->maybe_command
- ignore the case of letters when comparing file names
Modified: jifty/trunk/lib/Jifty/Util.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Util.pm (original)
+++ jifty/trunk/lib/Jifty/Util.pm Sat Jan 27 13:11:26 2007
@@ -14,6 +14,7 @@
use Jifty ();
use File::Spec ();
+use ExtUtils::MM;
use Cwd ();
use vars qw/%ABSOLUTE_PATH $JIFTY_ROOT $SHARE_ROOT $APP_ROOT/;
@@ -156,10 +157,15 @@
# Also, /usr/bin or /usr/local/bin should be taken from
# %Config{bin} or %Config{scriptdir} or something like that
# for portablility.
+ # Note that to compare files in Win32 we have to ignore the case
(-e $try or (($^O =~ /(?:MSWin32|cygwin|os2)/) and MM->maybe_command($try)))
- and $try ne File::Spec->catdir($Config::Config{bin}, "jifty")
- and $try ne File::Spec->catdir($Config::Config{scriptdir}, "jifty") )
+ and lc($try) ne lc(File::Spec->catdir($Config::Config{bin}, "jifty"))
+ and lc($try) ne lc(File::Spec->catdir($Config::Config{scriptdir}, "jifty")) )
{
+ #warn "root: ", File::Spec->catdir(@root);
+ #warn "bin/jifty: ", File::Spec->catdir($Config::Config{bin}, "jifty");
+ #warn "scriptdir/jifty: ", File::Spec->catdir($Config::Config{scriptdir}, "jifty");
+ #warn "try: $try";
return $APP_ROOT = File::Spec->catdir(@root);
}
pop @root;
More information about the Jifty-commit
mailing list