From e7888e88e022d4d0d7f4ff425ca7b6f174b80f6d Mon Sep 17 00:00:00 2001 From: Pacman Ghost Date: Sat, 3 Sep 2022 14:58:25 +1000 Subject: [PATCH] Cached V/O note images for extensions are now saved in their own sub-directory. --- vasl_templates/webapp/vo_notes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vasl_templates/webapp/vo_notes.py b/vasl_templates/webapp/vo_notes.py index bf6bac8..0bad827 100644 --- a/vasl_templates/webapp/vo_notes.py +++ b/vasl_templates/webapp/vo_notes.py @@ -370,6 +370,9 @@ def _make_vo_note_cached_image_fname( vo_type, nat, key ): """Get the name of the cached vehicle/ordnance note image.""" if not _vo_notes_image_cache_dname: return None + # NOTE: Extensions will have keys like "adf-bj:12", so we put these in their own sub-directory. + # NOTE: ":" in file paths was also causing problems on Windows :-/ + key = key.replace( ":", os.sep ) return os.path.join( _vo_notes_image_cache_dname, vo_type, nat, key+".png" ) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -