mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50: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]:
|
if key not in lst[akey]:
|
||||||
lst[akey][key] = {}
|
lst[akey][key] = {}
|
||||||
if key == "icon":
|
if key == "icon":
|
||||||
shutil.copy(
|
icons_dir = os.path.join(repodir, 'icons')
|
||||||
os.path.join("config", value),
|
if not os.path.exists(icons_dir):
|
||||||
os.path.join(repodir, "icons")
|
os.mkdir(icons_dir)
|
||||||
)
|
shutil.copy(os.path.join("config", value), icons_dir)
|
||||||
lst[akey][key][locale] = file_entry(
|
lst[akey][key][locale] = file_entry(
|
||||||
os.path.join(repodir, "icons", value)
|
os.path.join(icons_dir, value)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
lst[akey][key][locale] = value
|
lst[akey][key][locale] = value
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue