Append suffix to uploaded database

This commit is contained in:
JonnyWong16 2020-05-23 16:27:23 -07:00
parent 42c6340c06
commit bdbfafabbd
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -3774,7 +3774,7 @@ class WebInterface(object):
return {'result': 'error', 'message': 'No app specified for import'} return {'result': 'error', 'message': 'No app specified for import'}
if database_file: if database_file:
database_path = os.path.join(plexpy.CONFIG.CACHE_DIR, database_file.filename) database_path = os.path.join(plexpy.CONFIG.CACHE_DIR, database_file.filename + '.import.db')
logger.info("Received database file '%s' for import. Saving to cache '%s'.", logger.info("Received database file '%s' for import. Saving to cache '%s'.",
database_file.filename, database_path) database_file.filename, database_path)
with open(database_path, 'wb') as f: with open(database_path, 'wb') as f: