kopia lustrzana https://github.com/simonw/datasette
Full path to database now works
e.g. datasette /tmp/blah.db Previously this failed because it did not open with full path.pull/81/head
rodzic
db3fa4abfa
commit
efecae5a11
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue