[Bps-public-commit] r17278 - Prophet/trunk/lib/Prophet
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Dec 17 17:56:55 EST 2008
Author: sunnavy
Date: Wed Dec 17 17:56:55 2008
New Revision: 17278
Modified:
Prophet/trunk/lib/Prophet/Server.pm
Log:
fast_abs_path will die if feed a non exist path
Modified: Prophet/trunk/lib/Prophet/Server.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Server.pm (original)
+++ Prophet/trunk/lib/Prophet/Server.pm Wed Dec 17 17:56:55 2008
@@ -16,16 +16,17 @@
use JSON;
-my $PROPHET_STATIC_ROOT = Cwd::fast_abs_path(
- File::Spec->catdir(
- Prophet::Util->updir( $INC{'Prophet.pm'} ),
- "..", "share", "web", "static"
- )
-);
+my $PROPHET_STATIC_ROOT =
+ File::Spec->catdir( Prophet::Util->updir( $INC{'Prophet.pm'} ),
+ "..", "share", "web", "static" );
+
$PROPHET_STATIC_ROOT
= File::Spec->catfile( File::ShareDir::dist_dir('Prophet'), 'web/static' )
if ( !-d $PROPHET_STATIC_ROOT );
+$PROPHET_STATIC_ROOT = Cwd::fast_abs_path($PROPHET_STATIC_ROOT)
+ unless File::Spec->file_name_is_absolute($PROPHET_STATIC_ROOT);
+
has app_handle => (
isa => 'Prophet::App',
is => 'rw',
More information about the Bps-public-commit
mailing list