Place map type (col, spec, etc) at end of filename instead of start.

This commit is contained in:
Sybren A. Stüvel 2016-05-18 14:14:38 +02:00
parent 8201ba7691
commit 7b59391872

View File

@ -530,8 +530,9 @@ async def download_file_by_uuid(file_uuid,
metadata_file = os.path.join(metadata_directory, 'files', '%s.json' % file_uuid)
save_as_json(file_desc, metadata_file)
root, ext = os.path.splitext(file_desc['filename'])
file_path = os.path.join(target_directory,
sanitize_filename('%s-%s' % (map_type, file_desc['filename'])))
sanitize_filename('%s-%s%s' % (root, map_type, ext)))
file_url = file_desc['link']
# log.debug('Texture %r:\n%s', file_uuid, pprint.pformat(file_desc.to_dict()))
loop.call_soon_threadsafe(file_loading, file_path, file_desc)