[Rt-commit] [svn] r1455 - in rt: . branches/3.3-TESTING/lib/RT

autrijus at pallas.eruditorum.org autrijus at pallas.eruditorum.org
Wed Sep 8 15:54:55 EDT 2004


Author: autrijus
Date: Wed Sep  8 15:54:55 2004
New Revision: 1455

Modified:
   rt/   (props changed)
   rt/branches/3.3-TESTING/lib/RT/Handle.pm
Log:
 r5741 at xor:  autrijus | 2004-09-08T19:54:33.611316Z
 * With SQLite, put database in $VarPath if $DatabaseName is relative.


Modified: rt/branches/3.3-TESTING/lib/RT/Handle.pm
==============================================================================
--- rt/branches/3.3-TESTING/lib/RT/Handle.pm	(original)
+++ rt/branches/3.3-TESTING/lib/RT/Handle.pm	Wed Sep  8 15:54:55 2004
@@ -108,12 +108,16 @@
 
 =cut
 
+use File::Spec;
 
 sub BuildDSN {
     my $self = shift;
 # Unless the database port is a positive integer, we really don't want to pass it.
 $RT::DatabasePort = undef unless (defined $RT::DatabasePort && $RT::DatabasePort =~ /^(\d+)$/);
 $RT::DatabaseHost = undef unless (defined $RT::DatabaseHost && $RT::DatabaseHost ne '');
+$RT::DatabaseName = File::Spec->catfile($RT::VarPath, $RT::DatabaseName)
+    if ($RT::DatabaseType eq 'SQLite') and
+	not File::Spec->file_name_is_absolute($RT::DatabaseName);
 
 
     $self->SUPER::BuildDSN(Host => $RT::DatabaseHost, 


More information about the Rt-commit mailing list