0.9.3.2: Delete entry from the DB is the file doesn't exists on the filesystem
This commit is contained in:
parent
9de4960932
commit
99c22095f9
2 changed files with 3 additions and 1 deletions
|
@ -2,7 +2,7 @@ colorize_logs: true
|
|||
files: "./files"
|
||||
thumbnails: "./thumbnails"
|
||||
generateThumbnails: true
|
||||
db: "./db.sqlite3"
|
||||
db: "./db/db.sqlite3"
|
||||
adminEnabled: true
|
||||
adminApiKey: "asd"
|
||||
fileameLength: 3
|
||||
|
|
|
@ -60,6 +60,8 @@ module Utils
|
|||
SQL.exec "DELETE FROM files WHERE filename = ?", file[:filename]
|
||||
rescue ex
|
||||
LOGGER.error "#{ex.message}"
|
||||
# Also delete the file entry from the DB if it doesn't exist.
|
||||
SQL.exec "DELETE FROM files WHERE filename = ?", file[:filename]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue