Skip to content

Commit

Permalink
missing database symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
Glenn McKechnie committed Mar 14, 2018
1 parent 6627273 commit 20370aa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bin/user/wxobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,20 @@ def __init__(self, generator):
# preempt inevitable warning/exception when using test_sqlite = False
self.sq_dbase = self.generator.config_dict['Databases'] \
[def_dbase].get('database_name')
new_location = (self.dest_dir+"/"+ self.sq_dbase)
v_al = ["<?php\n $php_dbase = 'sqlite';\n $php_sqlite_db = '%s/%s';\n" %
(self.dest_dir, self.sq_dbase)]

# symlink database to new, offsite location (allows local usage)
org_location = (self.sq_root+"/"+self.sq_dbase)
if self.wxobs_debug == 6:
loginf("database \'symlink %s %s\'" % (org_location, new_location))
if not os.path.isfile(new_location):
try:
os.symlink(org_location, new_location)
except OSError, e:
logerr("error creating database symlink %s" % e)

try:
if not os.access(self.include_file, os.W_OK):
os.makedirs(self.inc_path)
Expand Down

0 comments on commit 20370aa

Please sign in to comment.