chiark / gitweb /
can save
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Sep 2012 17:35:36 +0000 (18:35 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Sep 2012 17:35:36 +0000 (18:35 +0100)
.gitignore
AwayMsg.pm

index cce0b03..cef72f0 100644 (file)
@@ -1,2 +1,2 @@
 *~
-away.db
+data/away.db
index da9eaee..472850a 100644 (file)
@@ -28,13 +28,13 @@ sub www_begin ($$) {
 sub db_connect () {
     my $dbf;
     foreach my $d (@INC) {
-       $dbf = "$d/away.db";
+       $dbf = "$d/data/away.db";
        if (stat $dbf) {
            chdir($d) or die $!;
            last;
        }
     }
-    $dbh = DBI->connect("dbi:SQLite:away.db",
+    $dbh = DBI->connect("dbi:SQLite:$dbf",'','',
                         { AutoCommit=>0,
                           RaiseError=>1, ShowErrorStatement=>1
                         })