mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
common: load_localized_config() should make repo/ if not present
For 1,000,000 checks, this adds: * ~4 seconds of runtime on a server with very slow disks. * ~0.7 seconds of runtime on my laptop with a fast SSD.
This commit is contained in:
parent
49362b5fd1
commit
74a23284e1
1 changed files with 5 additions and 5 deletions
|
|
@ -510,12 +510,12 @@ def load_localized_config(name, repodir):
|
|||
if key not in lst[akey]:
|
||||
lst[akey][key] = {}
|
||||
if key == "icon":
|
||||
shutil.copy(
|
||||
os.path.join("config", value),
|
||||
os.path.join(repodir, "icons")
|
||||
)
|
||||
icons_dir = os.path.join(repodir, 'icons')
|
||||
if not os.path.exists(icons_dir):
|
||||
os.mkdir(icons_dir)
|
||||
shutil.copy(os.path.join("config", value), icons_dir)
|
||||
lst[akey][key][locale] = file_entry(
|
||||
os.path.join(repodir, "icons", value)
|
||||
os.path.join(icons_dir, value)
|
||||
)
|
||||
else:
|
||||
lst[akey][key][locale] = value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue