mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Full path to database now works
e.g. datasette /tmp/blah.db Previously this failed because it did not open with full path.
This commit is contained in:
parent
db3fa4abfa
commit
efecae5a11
1 changed files with 2 additions and 2 deletions
|
|
@ -493,7 +493,7 @@ class Datasette:
|
|||
m.update(data)
|
||||
# List tables and their row counts
|
||||
tables = {}
|
||||
with sqlite3.connect('file:{}?immutable=1'.format(path.name), uri=True) as conn:
|
||||
with sqlite3.connect('file:{}?immutable=1'.format(path), uri=True) as conn:
|
||||
conn.row_factory = sqlite3.Row
|
||||
table_names = [
|
||||
r['name']
|
||||
|
|
@ -504,7 +504,7 @@ class Datasette:
|
|||
|
||||
metadata[name] = {
|
||||
'hash': m.hexdigest(),
|
||||
'file': path.name,
|
||||
'file': str(path),
|
||||
'tables': tables,
|
||||
}
|
||||
self._metadata = metadata
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue