mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-25 00:00:52 -04:00
Compare with DB when loading library cache (fixes #256)
This commit is contained in:
@@ -163,3 +163,12 @@ def sanitize_filename(str : String) : String
|
||||
.gsub(/[\177\000-\031\\:\*\?\"<>\|]/, "")
|
||||
sanitized.size > 0 ? sanitized : random_str
|
||||
end
|
||||
|
||||
def delete_cache_and_exit(path : String)
|
||||
File.delete path
|
||||
Logger.fatal "Invalid library cache deleted. Mango needs to " \
|
||||
"perform a full reset to recover from this. " \
|
||||
"Pleae restart Mango. This is NOT a bug."
|
||||
Logger.fatal "Exiting"
|
||||
exit 1
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user