mirror of
https://github.com/simonw/datasette.git
synced 2026-07-22 07:24:43 +02:00
sort files by mtime
This commit is contained in:
parent
49184c569c
commit
689e3b0155
1 changed files with 1 additions and 0 deletions
|
|
@ -267,6 +267,7 @@ class Datasette:
|
|||
db_files = []
|
||||
for ext in ("db", "sqlite", "sqlite3"):
|
||||
db_files.extend(config_dir.glob("*.{}".format(ext)))
|
||||
db_files.sort(key=os.path.getmtime, reverse=True)
|
||||
self.files += tuple(str(f) for f in db_files)
|
||||
if (
|
||||
config_dir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue