mirror of
https://github.com/taoky/shadowmire.git
synced 2025-07-08 17:32:43 +00:00
Add verification for v1_html and symlink
This commit is contained in:
parent
b5fca47101
commit
b9c6ac5c62
@ -491,14 +491,20 @@ class SyncBase:
|
|||||||
continue
|
continue
|
||||||
package_simple_path = self.simple_dir / package_name
|
package_simple_path = self.simple_dir / package_name
|
||||||
html_simple = package_simple_path / "index.html"
|
html_simple = package_simple_path / "index.html"
|
||||||
|
htmlv1_simple = package_simple_path / "index.v1_html"
|
||||||
json_simple = package_simple_path / "index.v1_json"
|
json_simple = package_simple_path / "index.v1_json"
|
||||||
if not (html_simple.exists() and json_simple.exists()):
|
if not (
|
||||||
|
html_simple.exists() and json_simple.exists() and htmlv1_simple.exists()
|
||||||
|
):
|
||||||
logger.info(
|
logger.info(
|
||||||
"add %s as it does not have index.html or index.v1_json",
|
"add %s as it does not have index.html, index.v1_html or index.v1_json",
|
||||||
package_name,
|
package_name,
|
||||||
)
|
)
|
||||||
to_update.append(package_name)
|
to_update.append(package_name)
|
||||||
continue
|
continue
|
||||||
|
if not html_simple.is_symlink():
|
||||||
|
html_simple.unlink()
|
||||||
|
html_simple.symlink_to("index.v1_html")
|
||||||
hrefs_html = get_package_urls_from_index_html(html_simple)
|
hrefs_html = get_package_urls_from_index_html(html_simple)
|
||||||
hrefsize_json = get_package_urls_size_from_index_json(json_simple)
|
hrefsize_json = get_package_urls_size_from_index_json(json_simple)
|
||||||
if (
|
if (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user