Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mapadroid/updater/updater.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import asyncio
import glob
import json
import os
import re
import time
from asyncio import CancelledError, Task
from datetime import datetime, timedelta
from pathlib import Path
from typing import AsyncGenerator, Dict, List, Optional, Tuple, Union

import asyncio_rlock
Expand Down Expand Up @@ -98,14 +98,14 @@ async def _load_jobs(self):
if os.path.exists('commands.json'):
await self._load_jobs_from_file('commands.json')
# load personal commands
for command_file in glob.glob(os.path.join("personal_commands", "*.json")):
for command_file in Path("personal_commands").rglob("*.json"):
try:
await self._load_jobs_from_file(command_file)
except Exception as e:
logger.error('Cannot add job {} - Reason: {}', command_file, e)

# Read all .apk files in the upload dir
for apk_file in glob.glob(str(MadGlobals.application_args.upload_path) + "/*.apk"):
for apk_file in Path(MadGlobals.application_args.upload_path).rglob("*.apk"):
created: int = int(os.path.getmtime(apk_file))

self._available_jobs[os.path.basename(apk_file)] = [SubJob(TYPE=JobType.INSTALLATION,
Expand Down